/libuv/test/ |
H A D | test-poll.c | 61 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 D | test-tcp-open.c | 55 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 D | test-udp-open.c | 50 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 D | test-poll-closesocket.c | 29 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 D | test-poll-close-doesnt-corrupt-stack.c | 35 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 D | test-poll-multiple-handles.c | 47 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 D | test-pipe-sendmsg.c | 43 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 D | test-tcp-write-fail.c | 39 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 D | poll.c | 207 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 D | udp.c | 143 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 D | tcp.c | 178 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 D | core.c | 355 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 D | tcp.c | 352 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 D | udp.c | 1061 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 D | processes.rst | 311 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 D | tcp.rst | 66 .. c:function:: int uv_tcp_open(uv_tcp_t* handle, uv_os_sock_t sock)
|
H A D | udp.rst | 176 .. 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 D | uv.h | 601 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);
|