Lines Matching refs:sock
55 uv_os_sock_t sock; in create_tcp_socket() local
57 sock = socket(AF_INET, SOCK_STREAM, IPPROTO_IP); in create_tcp_socket()
59 ASSERT_NE(sock, INVALID_SOCKET); in create_tcp_socket()
61 ASSERT_GE(sock, 0); in create_tcp_socket()
68 int r = setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, &yes, sizeof yes); in create_tcp_socket()
73 return sock; in create_tcp_socket()
77 static void close_socket(uv_os_sock_t sock) { in close_socket() argument
80 r = closesocket(sock); in close_socket()
82 r = close(sock); in close_socket()
238 uv_os_sock_t sock; in TEST_IMPL() local
245 sock = create_tcp_socket(); in TEST_IMPL()
250 r = uv_tcp_open(&client, sock); in TEST_IMPL()
264 r = uv_tcp_open(&client2, sock); in TEST_IMPL()
315 uv_os_sock_t sock; in TEST_IMPL() local
318 sock = create_tcp_socket(); in TEST_IMPL()
324 ASSERT_OK(bind(sock, (struct sockaddr*) &addr, sizeof(addr))); in TEST_IMPL()
326 ASSERT_OK(uv_tcp_open(&server, sock)); in TEST_IMPL()
338 uv_os_sock_t sock; in TEST_IMPL() local
344 sock = create_tcp_socket(); in TEST_IMPL()
346 ASSERT_OK(connect(sock, (struct sockaddr*) &addr, sizeof(addr))); in TEST_IMPL()
350 ASSERT_OK(uv_tcp_open(&client, sock)); in TEST_IMPL()
377 uv_os_sock_t sock; in TEST_IMPL() local
383 sock = create_tcp_socket(); in TEST_IMPL()
388 r = uv_tcp_open(&client, sock); in TEST_IMPL()