Home
last modified time | relevance | path

Searched refs:sock (Results 1 – 18 of 18) sorted by relevance

/libuv/test/
H A Dtest-poll.c61 uv_os_sock_t sock; member
71 uv_os_sock_t sock; member
105 uv_os_sock_t sock; in create_bound_socket() local
112 ASSERT_GE(sock, 0); in create_bound_socket()
127 return sock; in create_bound_socket()
136 r = close(sock); in close_socket()
153 context->sock = sock; in create_connection_context()
470 context->sock = sock;
498 uv_os_sock_t sock; local
526 uv_os_sock_t sock; local
[all …]
H A Dtest-tcp-open.c55 uv_os_sock_t sock; in create_tcp_socket() local
61 ASSERT_GE(sock, 0); in create_tcp_socket()
73 return sock; in create_tcp_socket()
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()
315 uv_os_sock_t sock; in TEST_IMPL() local
318 sock = create_tcp_socket(); in TEST_IMPL()
338 uv_os_sock_t sock; in TEST_IMPL() local
[all …]
H A Dtest-udp-open.c50 uv_os_sock_t sock; in create_udp_socket() local
56 ASSERT_GE(sock, 0); in create_udp_socket()
68 return sock; in create_udp_socket()
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()
225 uv_os_sock_t sock; in TEST_IMPL() local
231 sock = create_udp_socket(); in TEST_IMPL()
257 uv_os_sock_t sock; in TEST_IMPL() local
[all …]
H A Dtest-poll-closesocket.c29 static uv_os_sock_t sock; variable
48 closesocket(sock); in poll_cb()
67 sock = socket(AF_INET, SOCK_STREAM, 0); in TEST_IMPL()
68 ASSERT_NE(sock, INVALID_SOCKET); in TEST_IMPL()
70 r = ioctlsocket(sock, FIONBIO, &on); in TEST_IMPL()
76 r = connect(sock, (const struct sockaddr*) &addr, sizeof addr); in TEST_IMPL()
80 r = uv_poll_init_socket(uv_default_loop(), &handle, sock); in TEST_IMPL()
H A Dtest-poll-close-doesnt-corrupt-stack.c35 static uv_os_sock_t sock; variable
61 r = closesocket(sock); in close_socket_and_verify_stack()
84 sock = socket(AF_INET, SOCK_STREAM, 0); in TEST_IMPL()
85 ASSERT_NE(sock, INVALID_SOCKET); in TEST_IMPL()
87 r = ioctlsocket(sock, FIONBIO, &on); in TEST_IMPL()
93 r = connect(sock, (const struct sockaddr*) &addr, sizeof addr); in TEST_IMPL()
97 r = uv_poll_init_socket(uv_default_loop(), &handle, sock); in TEST_IMPL()
H A Dtest-poll-multiple-handles.c47 uv_os_sock_t sock; in TEST_IMPL() local
58 sock = socket(AF_INET, SOCK_STREAM, 0); in TEST_IMPL()
60 ASSERT_NE(sock, INVALID_SOCKET); in TEST_IMPL()
62 ASSERT_NE(sock, -1); in TEST_IMPL()
66 sock)); in TEST_IMPL()
69 sock)); in TEST_IMPL()
H A Dtest-pipe-sendmsg.c43 static void set_nonblocking(uv_os_sock_t sock) { in set_nonblocking() argument
47 r = ioctlsocket(sock, FIONBIO, &on); in set_nonblocking()
50 int flags = fcntl(sock, F_GETFL, 0); in set_nonblocking()
52 r = fcntl(sock, F_SETFL, flags | O_NONBLOCK); in set_nonblocking()
H A Dtest-tcp-write-fail.c39 static void close_socket(uv_tcp_t* sock) { in close_socket() argument
43 r = uv_fileno((uv_handle_t*)sock, &fd); in close_socket()
/libuv/src/win/
H A Dpoll.c207 SOCKET sock = 0; in uv__fast_poll_create_peer_socket() local
209 sock = WSASocketW(protocol_info->iAddressFamily, in uv__fast_poll_create_peer_socket()
215 if (sock == INVALID_SOCKET) { in uv__fast_poll_create_peer_socket()
219 if (!SetHandleInformation((HANDLE) sock, HANDLE_FLAG_INHERIT, 0)) { in uv__fast_poll_create_peer_socket()
223 if (CreateIoCompletionPort((HANDLE) sock, in uv__fast_poll_create_peer_socket()
225 (ULONG_PTR) sock, in uv__fast_poll_create_peer_socket()
230 return sock; in uv__fast_poll_create_peer_socket()
233 closesocket(sock); in uv__fast_poll_create_peer_socket()
H A Dudp.c143 SOCKET sock; in uv__udp_init_ex() local
146 sock = socket(domain, SOCK_DGRAM, 0); in uv__udp_init_ex()
147 if (sock == INVALID_SOCKET) { in uv__udp_init_ex()
153 err = uv__udp_set_socket(handle->loop, handle, sock, domain); in uv__udp_init_ex()
155 closesocket(sock); in uv__udp_init_ex()
215 SOCKET sock = socket(addr->sa_family, SOCK_DGRAM, 0); in uv__udp_maybe_bind() local
216 if (sock == INVALID_SOCKET) { in uv__udp_maybe_bind()
222 closesocket(sock); in uv__udp_maybe_bind()
911 int uv_udp_open(uv_udp_t* handle, uv_os_sock_t sock) { in uv_udp_open() argument
918 if (getsockopt(sock, in uv_udp_open()
[all …]
H A Dtcp.c178 SOCKET sock; in uv_tcp_init_ex() local
181 sock = socket(domain, SOCK_STREAM, 0); in uv_tcp_init_ex()
182 if (sock == INVALID_SOCKET) { in uv_tcp_init_ex()
190 closesocket(sock); in uv_tcp_init_ex()
302 SOCKET sock; in uv__tcp_try_bind() local
308 sock = socket(addr->sa_family, SOCK_STREAM, 0); in uv__tcp_try_bind()
309 if (sock == INVALID_SOCKET) { in uv__tcp_try_bind()
315 closesocket(sock); in uv__tcp_try_bind()
1489 int uv_tcp_open(uv_tcp_t* handle, uv_os_sock_t sock) { in uv_tcp_open() argument
1498 if (getsockopt(sock, in uv_tcp_open()
[all …]
H A Dcore.c355 SOCKET sock = loop->poll_peer_sockets[i]; in uv__loop_close() local
356 if (sock != 0 && sock != INVALID_SOCKET) in uv__loop_close()
357 closesocket(sock); in uv__loop_close()
/libuv/src/unix/
H A Dtcp.c352 int uv_tcp_open(uv_tcp_t* handle, uv_os_sock_t sock) { in uv_tcp_open() argument
355 if (uv__fd_exists(handle->loop, sock)) in uv_tcp_open()
358 err = uv__nonblock(sock, 1); in uv_tcp_open()
363 sock, in uv_tcp_open()
H A Dudp.c1061 int uv_udp_open(uv_udp_t* handle, uv_os_sock_t sock) { in uv_udp_open() argument
1068 if (uv__fd_exists(handle->loop, sock)) in uv_udp_open()
1071 err = uv__nonblock(sock, 1); in uv_udp_open()
1075 err = uv__sock_reuseaddr(sock); in uv_udp_open()
1079 handle->io_watcher.fd = sock; in uv_udp_open()
/libuv/docs/src/guide/
H A Dprocesses.rst311 We name the socket ``echo.sock`` which means it will be created in the local
321 where ``name`` will be ``echo.sock`` or similar. On Unix systems, ``name`` must
322 point to a valid file (e.g. ``/tmp/echo.sock``). On Windows, ``name`` follows a
323 ``\\?\pipe\echo.sock`` format.
/libuv/docs/src/
H A Dtcp.rst66 .. c:function:: int uv_tcp_open(uv_tcp_t* handle, uv_os_sock_t sock)
H A Dudp.rst176 .. c:function:: int uv_udp_open(uv_udp_t* handle, uv_os_sock_t sock)
181 The only requirement of the `sock` argument is that it follows the datagram
/libuv/include/
H A Duv.h601 UV_EXTERN int uv_tcp_open(uv_tcp_t* handle, uv_os_sock_t sock);
742 UV_EXTERN int uv_udp_open(uv_udp_t* handle, uv_os_sock_t sock);

Completed in 59 milliseconds