Lines Matching refs:socket

40 static int uv__tcp_nodelay(uv_tcp_t* handle, SOCKET socket, int enable) {  in uv__tcp_nodelay()  argument
41 if (setsockopt(socket, in uv__tcp_nodelay()
52 static int uv__tcp_keepalive(uv_tcp_t* handle, SOCKET socket, int enable, unsigned int delay) { in uv__tcp_keepalive() argument
53 if (setsockopt(socket, in uv__tcp_keepalive()
67 if (setsockopt(socket, in uv__tcp_keepalive()
81 SOCKET socket, in uv__tcp_set_socket() argument
88 if (handle->socket != INVALID_SOCKET) in uv__tcp_set_socket()
92 if (ioctlsocket(socket, FIONBIO, &yes) == SOCKET_ERROR) { in uv__tcp_set_socket()
97 if (!SetHandleInformation((HANDLE) socket, HANDLE_FLAG_INHERIT, 0)) in uv__tcp_set_socket()
102 if (CreateIoCompletionPort((HANDLE)socket, in uv__tcp_set_socket()
104 (ULONG_PTR)socket, in uv__tcp_set_socket()
122 if (!SetFileCompletionNotificationModes((HANDLE) socket, sfcnm_flags)) in uv__tcp_set_socket()
128 err = uv__tcp_nodelay(handle, socket, 1); in uv__tcp_set_socket()
135 err = uv__tcp_keepalive(handle, socket, 1, 60); in uv__tcp_set_socket()
140 handle->socket = socket; in uv__tcp_set_socket()
166 handle->socket = INVALID_SOCKET; in uv_tcp_init_ex()
181 sock = socket(domain, SOCK_STREAM, 0); in uv_tcp_init_ex()
221 else if (shutdown(stream->socket, SD_SEND) == SOCKET_ERROR) in uv__process_tcp_shutdown_req()
240 assert(handle->socket == INVALID_SOCKET); in uv__tcp_endgame()
301 if (handle->socket == INVALID_SOCKET) { in uv__tcp_try_bind()
308 sock = socket(addr->sa_family, SOCK_STREAM, 0); in uv__tcp_try_bind()
329 setsockopt(handle->socket, in uv__tcp_try_bind()
337 r = bind(handle->socket, addr, addrlen); in uv__tcp_try_bind()
411 accept_socket = socket(family, SOCK_STREAM, 0); in uv__tcp_queue_accept()
435 success = handle->tcp.serv.func_acceptex(handle->socket, in uv__tcp_queue_accept()
501 result = WSARecv(handle->socket, in uv__tcp_queue_read()
541 if (0 != setsockopt(handle->socket, SOL_SOCKET, SO_LINGER, (const char*)&l, sizeof(l))) in uv_tcp_close_reset()
580 if (!uv__get_acceptex_function(handle->socket, &handle->tcp.serv.func_acceptex)) { in uv__tcp_listen()
587 listen(handle->socket, backlog) == SOCKET_ERROR) { in uv__tcp_listen()
803 if (!uv__get_connectex_function(handle->socket, &handle->tcp.conn.func_connectex)) { in uv__tcp_try_connect()
816 WSAIoctl(handle->socket, in uv__tcp_try_connect()
842 success = handle->tcp.conn.func_connectex(handle->socket, in uv__tcp_try_connect()
915 result = WSASend(handle->socket, in uv__tcp_write()
967 result = WSASend(handle->socket, in uv__tcp_try_write()
1052 if (WSARecv(handle->socket, in uv__process_tcp_read_req()
1145 closesocket(handle->socket); in uv__process_tcp_write_req()
1146 handle->socket = INVALID_SOCKET; in uv__process_tcp_write_req()
1182 (char*)&handle->socket, in uv__process_tcp_accept_req()
1183 sizeof(handle->socket)) == 0) { in uv__process_tcp_accept_req()
1226 } else if (setsockopt(handle->socket, in uv__process_tcp_connect_req()
1262 listen(handle->socket, SOMAXCONN) == SOCKET_ERROR) { in uv__tcp_xfer_export()
1268 if (WSADuplicateSocketW(handle->socket, target_pid, &xfer_info->socket_info)) in uv__tcp_xfer_export()
1284 SOCKET socket; in uv__tcp_xfer_import() local
1289 socket = WSASocketW(FROM_PROTOCOL_INFO, in uv__tcp_xfer_import()
1296 if (socket == INVALID_SOCKET) { in uv__tcp_xfer_import()
1301 tcp->loop, tcp, socket, xfer_info->socket_info.iAddressFamily, 1); in uv__tcp_xfer_import()
1303 closesocket(socket); in uv__tcp_xfer_import()
1322 if (handle->socket != INVALID_SOCKET) { in uv_tcp_nodelay()
1323 err = uv__tcp_nodelay(handle, handle->socket, enable); in uv_tcp_nodelay()
1341 if (handle->socket != INVALID_SOCKET) { in uv_tcp_keepalive()
1342 err = uv__tcp_keepalive(handle, handle->socket, enable, delay); in uv_tcp_keepalive()
1392 SOCKET socket; in uv__tcp_try_cancel_reqs() local
1397 socket = tcp->socket; in uv__tcp_try_cancel_reqs()
1406 CancelIoEx((HANDLE) socket, &tcp->read_req.u.io.overlapped); in uv__tcp_try_cancel_reqs()
1408 CancelIo((HANDLE) socket); in uv__tcp_try_cancel_reqs()
1418 if (WSAIoctl(socket, in uv__tcp_try_cancel_reqs()
1422 &socket, in uv__tcp_try_cancel_reqs()
1423 sizeof socket, in uv__tcp_try_cancel_reqs()
1432 assert(socket != 0 && socket != INVALID_SOCKET); in uv__tcp_try_cancel_reqs()
1434 if (socket != tcp->socket) { in uv__tcp_try_cancel_reqs()
1436 CancelIoEx((HANDLE) socket, &tcp->read_req.u.io.overlapped); in uv__tcp_try_cancel_reqs()
1438 CancelIo((HANDLE) socket); in uv__tcp_try_cancel_reqs()
1480 closesocket(tcp->socket); in uv__tcp_close()
1481 tcp->socket = INVALID_SOCKET; in uv__tcp_close()