Classes | Functions | Variables
echo-server.c File Reference
#include "uv.h"
#include "task.h"
#include <stdio.h>
#include <stdlib.h>
Include dependency graph for echo-server.c:

Go to the source code of this file.

Classes

struct  write_req_t
 

Functions

static void after_read (uv_stream_t *, ssize_t nread, const uv_buf_t *buf)
 
static void after_shutdown (uv_shutdown_t *req, int status)
 
static void after_write (uv_write_t *req, int status)
 
static void echo_alloc (uv_handle_t *handle, size_t suggested_size, uv_buf_t *buf)
 
 HELPER_IMPL (pipe_echo_server)
 
 HELPER_IMPL (tcp4_echo_server)
 
 HELPER_IMPL (tcp6_echo_server)
 
 HELPER_IMPL (udp4_echo_server)
 
static void on_close (uv_handle_t *peer)
 
static void on_connection (uv_stream_t *, int status)
 
static void on_recv (uv_udp_t *handle, ssize_t nread, const uv_buf_t *rcvbuf, const struct sockaddr *addr, unsigned flags)
 
static void on_send (uv_udp_send_t *req, int status)
 
static void on_server_close (uv_handle_t *handle)
 
static int pipe_echo_start (char *pipeName)
 
static uv_udp_send_tsend_alloc (void)
 
static void slab_alloc (uv_handle_t *handle, size_t suggested_size, uv_buf_t *buf)
 
static int tcp4_echo_start (int port)
 
static int tcp6_echo_start (int port)
 
static int udp4_echo_start (int port)
 

Variables

static uv_loop_tloop
 
static uv_pipe_t pipeServer
 
static uv_udp_send_tsend_freelist
 
static uv_handle_tserver
 
static int server_closed
 
static stream_type serverType
 
static uv_tcp_t tcpServer
 
static uv_udp_t udpServer
 

Function Documentation

◆ after_read()

static void after_read ( uv_stream_t handle,
ssize_t  nread,
const uv_buf_t buf 
)
static

Definition at line 73 of file echo-server.c.

◆ after_shutdown()

static void after_shutdown ( uv_shutdown_t req,
int  status 
)
static

Definition at line 67 of file echo-server.c.

◆ after_write()

static void after_write ( uv_write_t req,
int  status 
)
static

Definition at line 49 of file echo-server.c.

◆ echo_alloc()

static void echo_alloc ( uv_handle_t handle,
size_t  suggested_size,
uv_buf_t buf 
)
static

Definition at line 130 of file echo-server.c.

◆ HELPER_IMPL() [1/4]

HELPER_IMPL ( pipe_echo_server  )

Definition at line 386 of file echo-server.c.

◆ HELPER_IMPL() [2/4]

HELPER_IMPL ( tcp4_echo_server  )

Definition at line 362 of file echo-server.c.

◆ HELPER_IMPL() [3/4]

HELPER_IMPL ( tcp6_echo_server  )

Definition at line 374 of file echo-server.c.

◆ HELPER_IMPL() [4/4]

HELPER_IMPL ( udp4_echo_server  )

Definition at line 398 of file echo-server.c.

◆ on_close()

static void on_close ( uv_handle_t peer)
static

Definition at line 125 of file echo-server.c.

◆ on_connection()

static void on_connection ( uv_stream_t server,
int  status 
)
static

Definition at line 146 of file echo-server.c.

◆ on_recv()

static void on_recv ( uv_udp_t handle,
ssize_t  nread,
const uv_buf_t rcvbuf,
const struct sockaddr *  addr,
unsigned  flags 
)
static

Definition at line 206 of file echo-server.c.

◆ on_send()

static void on_send ( uv_udp_send_t req,
int  status 
)
static

Definition at line 199 of file echo-server.c.

◆ on_server_close()

static void on_server_close ( uv_handle_t handle)
static

Definition at line 186 of file echo-server.c.

◆ pipe_echo_start()

static int pipe_echo_start ( char *  pipeName)
static

Definition at line 326 of file echo-server.c.

◆ send_alloc()

static uv_udp_send_t* send_alloc ( void  )
static

Definition at line 190 of file echo-server.c.

◆ slab_alloc()

static void slab_alloc ( uv_handle_t handle,
size_t  suggested_size,
uv_buf_t buf 
)
static

Definition at line 137 of file echo-server.c.

◆ tcp4_echo_start()

static int tcp4_echo_start ( int  port)
static

Definition at line 227 of file echo-server.c.

◆ tcp6_echo_start()

static int tcp6_echo_start ( int  port)
static

Definition at line 261 of file echo-server.c.

◆ udp4_echo_start()

static int udp4_echo_start ( int  port)
static

Definition at line 296 of file echo-server.c.

Variable Documentation

◆ loop

uv_loop_t* loop
static

Definition at line 32 of file echo-server.c.

◆ pipeServer

uv_pipe_t pipeServer
static

Definition at line 38 of file echo-server.c.

◆ send_freelist

uv_udp_send_t* send_freelist
static

Definition at line 40 of file echo-server.c.

◆ server

uv_handle_t* server
static

Definition at line 39 of file echo-server.c.

◆ server_closed

int server_closed
static

Definition at line 34 of file echo-server.c.

◆ serverType

stream_type serverType
static

Definition at line 35 of file echo-server.c.

◆ tcpServer

uv_tcp_t tcpServer
static

Definition at line 36 of file echo-server.c.

◆ udpServer

uv_udp_t udpServer
static

Definition at line 37 of file echo-server.c.



grpc
Author(s):
autogenerated on Fri May 16 2025 03:01:11