Functions | Variables
test-getsockname.c File Reference
#include "uv.h"
#include "task.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
Include dependency graph for test-getsockname.c:

Go to the source code of this file.

Functions

static void after_read (uv_stream_t *handle, ssize_t nread, const uv_buf_t *buf)
 
static void after_shutdown (uv_shutdown_t *req, int status)
 
static void alloc (uv_handle_t *handle, size_t suggested_size, uv_buf_t *buf)
 
static void check_sockname (struct sockaddr *addr, const char *compare_ip, int compare_port, const char *context)
 
static void on_close (uv_handle_t *peer)
 
static void on_connect (uv_connect_t *req, int status)
 
static void on_connection (uv_stream_t *server, int status)
 
static void tcp_connector (void)
 
static int tcp_listener (void)
 
 TEST_IMPL (getsockname_tcp)
 
 TEST_IMPL (getsockname_udp)
 
static int udp_listener (void)
 
static void udp_recv (uv_udp_t *handle, ssize_t nread, const uv_buf_t *buf, const struct sockaddr *addr, unsigned flags)
 
static void udp_send (uv_udp_send_t *req, int status)
 
static void udp_sender (void)
 

Variables

static int connect_port = -1
 
static uv_connect_t connect_req
 
static int getpeernamecount = 0
 
static int getsocknamecount = 0
 
static uv_loop_tloop
 
static uv_udp_send_t send_req
 
static const int server_port = TEST_PORT
 
static uv_tcp_t tcp
 
static uv_tcp_t tcpServer
 
static uv_udp_t udp
 
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 63 of file test-getsockname.c.

◆ after_shutdown()

static void after_shutdown ( uv_shutdown_t req,
int  status 
)
static

Definition at line 57 of file test-getsockname.c.

◆ alloc()

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

Definition at line 45 of file test-getsockname.c.

◆ check_sockname()

static void check_sockname ( struct sockaddr *  addr,
const char *  compare_ip,
int  compare_port,
const char *  context 
)
static

Definition at line 79 of file test-getsockname.c.

◆ on_close()

static void on_close ( uv_handle_t peer)
static

Definition at line 51 of file test-getsockname.c.

◆ on_connect()

static void on_connect ( uv_connect_t req,
int  status 
)
static

Definition at line 147 of file test-getsockname.c.

◆ on_connection()

static void on_connection ( uv_stream_t server,
int  status 
)
static

Definition at line 107 of file test-getsockname.c.

◆ tcp_connector()

static void tcp_connector ( void  )
static

Definition at line 211 of file test-getsockname.c.

◆ tcp_listener()

static int tcp_listener ( void  )
static

Definition at line 169 of file test-getsockname.c.

◆ TEST_IMPL() [1/2]

TEST_IMPL ( getsockname_tcp  )

Definition at line 326 of file test-getsockname.c.

◆ TEST_IMPL() [2/2]

TEST_IMPL ( getsockname_udp  )

Definition at line 344 of file test-getsockname.c.

◆ udp_listener()

static int udp_listener ( void  )
static

Definition at line 271 of file test-getsockname.c.

◆ udp_recv()

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

Definition at line 238 of file test-getsockname.c.

◆ udp_send()

static void udp_send ( uv_udp_send_t req,
int  status 
)
static

Definition at line 266 of file test-getsockname.c.

◆ udp_sender()

static void udp_sender ( void  )
static

Definition at line 305 of file test-getsockname.c.

Variable Documentation

◆ connect_port

int connect_port = -1
static

Definition at line 31 of file test-getsockname.c.

◆ connect_req

uv_connect_t connect_req
static

Definition at line 39 of file test-getsockname.c.

◆ getpeernamecount

int getpeernamecount = 0
static

Definition at line 34 of file test-getsockname.c.

◆ getsocknamecount

int getsocknamecount = 0
static

Definition at line 33 of file test-getsockname.c.

◆ loop

uv_loop_t* loop
static

Definition at line 36 of file test-getsockname.c.

◆ send_req

uv_udp_send_t send_req
static

Definition at line 42 of file test-getsockname.c.

◆ server_port

const int server_port = TEST_PORT
static

Definition at line 29 of file test-getsockname.c.

◆ tcp

uv_tcp_t tcp
static

Definition at line 37 of file test-getsockname.c.

◆ tcpServer

uv_tcp_t tcpServer
static

Definition at line 40 of file test-getsockname.c.

◆ udp

uv_udp_t udp
static

Definition at line 38 of file test-getsockname.c.

◆ udpServer

uv_udp_t udpServer
static

Definition at line 41 of file test-getsockname.c.



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