Lines Matching refs:sock
50 uv_os_sock_t sock; in create_udp_socket() local
52 sock = socket(AF_INET, SOCK_DGRAM, IPPROTO_IP); in create_udp_socket()
54 ASSERT_NE(sock, INVALID_SOCKET); in create_udp_socket()
56 ASSERT_GE(sock, 0); in create_udp_socket()
63 int r = setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, &yes, sizeof yes); in create_udp_socket()
68 return sock; in create_udp_socket()
72 static void close_socket(uv_os_sock_t sock) { in close_socket() argument
75 r = closesocket(sock); in close_socket()
77 r = close(sock); in close_socket()
142 uv_os_sock_t sock; in TEST_IMPL() local
148 sock = create_udp_socket(); in TEST_IMPL()
153 r = uv_udp_open(&client, sock); in TEST_IMPL()
175 r = uv_udp_open(&client2, sock); in TEST_IMPL()
225 uv_os_sock_t sock; in TEST_IMPL() local
231 sock = create_udp_socket(); in TEST_IMPL()
233 r = bind(sock, (struct sockaddr*) &addr, sizeof(addr)); in TEST_IMPL()
239 r = uv_udp_open(&client, sock); in TEST_IMPL()
257 uv_os_sock_t sock; in TEST_IMPL() local
263 sock = create_udp_socket(); in TEST_IMPL()
268 r = connect(sock, (const struct sockaddr*) &addr, sizeof(addr)); in TEST_IMPL()
271 r = uv_udp_open(&client, sock); in TEST_IMPL()