Home
last modified time | relevance | path

Searched refs:socket (Results 1 – 25 of 44) sorted by relevance

12

/libuv/docs/code/multi-echo-server/
H A Dhammer.js4 var write = function(socket) { argument
5 socket.write(PHRASE, 'utf8');
10 var socket = net.connect(7000, 'localhost', function() { variable
11 socket.on('data', function(reply) {
15 write(socket);
17 write(socket);
/libuv/src/win/
H A Dtcp.c41 if (setsockopt(socket, in uv__tcp_nodelay()
53 if (setsockopt(socket, in uv__tcp_keepalive()
67 if (setsockopt(socket, in uv__tcp_keepalive()
140 handle->socket = socket; in uv__tcp_set_socket()
1284 SOCKET socket; in uv__tcp_xfer_import() local
1303 closesocket(socket); in uv__tcp_xfer_import()
1392 SOCKET socket; in uv__tcp_try_cancel_reqs() local
1397 socket = tcp->socket; in uv__tcp_try_cancel_reqs()
1418 if (WSAIoctl(socket, in uv__tcp_try_cancel_reqs()
1432 assert(socket != 0 && socket != INVALID_SOCKET); in uv__tcp_try_cancel_reqs()
[all …]
H A Dudp.c100 (HANDLE) socket, in uv__udp_set_socket()
111 handle->socket = socket; in uv__udp_set_socket()
128 handle->socket = INVALID_SOCKET; in uv__udp_init_ex()
167 closesocket(handle->socket); in uv__udp_close()
168 handle->socket = INVALID_SOCKET; in uv__udp_close()
230 if (setsockopt(handle->socket, in uv__udp_maybe_bind()
250 setsockopt(handle->socket, in uv__udp_maybe_bind()
592 if (setsockopt(handle->socket, in uv__udp_set_membership4()
647 if (setsockopt(handle->socket, in uv__udp_set_membership6()
699 if (setsockopt(handle->socket, in uv__udp_set_source_membership4()
[all …]
H A Dwinsock.c41 static BOOL uv__get_extension_function(SOCKET socket, GUID guid, in uv__get_extension_function() argument
46 result = WSAIoctl(socket, in uv__get_extension_function()
65 BOOL uv__get_acceptex_function(SOCKET socket, LPFN_ACCEPTEX* target) { in uv__get_acceptex_function() argument
71 BOOL uv__get_connectex_function(SOCKET socket, LPFN_CONNECTEX* target) { in uv__get_connectex_function() argument
105 dummy = socket(AF_INET, SOCK_STREAM, IPPROTO_IP); in uv__winsock_init()
121 dummy = socket(AF_INET6, SOCK_STREAM, IPPROTO_IP); in uv__winsock_init()
270 int WSAAPI uv__wsarecv_workaround(SOCKET socket, WSABUF* buffers, in uv__wsarecv_workaround() argument
306 status = pNtDeviceIoControlFile((HANDLE) socket, in uv__wsarecv_workaround()
404 status = pNtDeviceIoControlFile((HANDLE) socket, in uv__wsarecvfrom_workaround()
461 int WSAAPI uv__msafd_poll(SOCKET socket, AFD_POLL_INFO* info_in, in uv__msafd_poll() argument
[all …]
H A Dpoll.c282 rfds.fd_array[0] = handle->socket; in uv__slow_poll_thread_proc()
289 wfds.fd_array[0] = handle->socket; in uv__slow_poll_thread_proc()
291 efds.fd_array[0] = handle->socket; in uv__slow_poll_thread_proc()
315 assert(rfds.fd_array[0] == handle->socket); in uv__slow_poll_thread_proc()
321 assert(wfds.fd_array[0] == handle->socket); in uv__slow_poll_thread_proc()
416 uv_os_sock_t socket) { in uv_poll_init_socket() argument
434 if (WSAIoctl(socket, in uv_poll_init_socket()
444 socket = base_socket; in uv_poll_init_socket()
448 handle->socket = socket; in uv_poll_init_socket()
453 if (getsockopt(socket, in uv_poll_init_socket()
[all …]
H A Dcore.c693 fd_out = (uv_os_fd_t)((uv_tcp_t*) handle)->socket; in uv_fileno()
705 fd_out = (uv_os_fd_t)((uv_udp_t*) handle)->socket; in uv_fileno()
709 fd_out = (uv_os_fd_t)((uv_poll_t*) handle)->socket; in uv_fileno()
727 SOCKET socket; in uv__socket_sockopt() local
733 socket = ((uv_tcp_t*) handle)->socket; in uv__socket_sockopt()
735 socket = ((uv_udp_t*) handle)->socket; in uv__socket_sockopt()
742 r = getsockopt(socket, SOL_SOCKET, optname, (char*) value, &len); in uv__socket_sockopt()
744 r = setsockopt(socket, SOL_SOCKET, optname, (const char*) value, len); in uv__socket_sockopt()
H A Dinternal.h301 BOOL uv__get_acceptex_function(SOCKET socket, LPFN_ACCEPTEX* target);
302 BOOL uv__get_connectex_function(SOCKET socket, LPFN_CONNECTEX* target);
304 int WSAAPI uv__wsarecv_workaround(SOCKET socket, WSABUF* buffers,
307 int WSAAPI uv__wsarecvfrom_workaround(SOCKET socket, WSABUF* buffers,
312 int WSAAPI uv__msafd_poll(SOCKET socket, AFD_POLL_INFO* info_in,
/libuv/docs/src/
H A Dpoll.rst11 rely on the event loop to signal it about the socket status changes, like
22 It is not okay to have multiple active poll handles for the same socket, this
27 but it might also start polling another socket. However the fd can be safely
84 .. versionchanged:: 1.2.2 the socket is set to non-blocking mode.
102 not close the socket while the handle is active. If the user does that
122 * The callback has been called because the socket became
124 this socket at all.
127 * The callback committed a write on the socket, but it remained
129 * The socket has already became readable/writable before calling
131 and since then the state of the socket did not changed.
[all …]
H A Derrors.rst96 service not available for socket type
100 socket type not supported
168 socket is already connected
236 socket is not connected
248 socket operation on non-socket
252 operation not supported on socket
276 protocol wrong type for socket
340 socket type not supported
H A Dtcp.rst29 /* Enable SO_REUSEPORT socket option when binding the handle.
55 Initialize the handle. No socket is created as of yet.
60 of the `flags` parameter are used as the socket domain. A socket will be created
61 for the given domain. If the specified domain is ``AF_UNSPEC`` no socket is created,
74 it's required that it represents a valid stream socket.
119 :param flags: Flags that control the behavior of binding the socket.
122 ``UV_TCP_REUSEPORT`` can be contained in `flags` to enable the socket option
168 setting the `SO_LINGER` socket option with a linger interval of zero and
183 - UV_NONBLOCK_PIPE: Opens the specified socket handle for `OVERLAPPED`
H A Dpipe.rst86 Connect to the Unix domain socket or the Windows named pipe.
99 Connect to the Unix domain socket or the Windows named pipe.
116 Get the name of the Unix domain socket or the named pipe.
128 Get the name of the Unix domain socket or the named pipe to which the handle
175 - UV_NONBLOCK_PIPE: Opens the specified socket handle for `OVERLAPPED`
H A Dudp.rst37 * This sets the SO_REUSEPORT socket flag on the BSDs (except for
68 * This sets the SO_REUSEPORT socket option on supported platforms.
113 flag set. If a UDP socket error occurs, `nread` will be < 0. In either scenario,
159 Initialize a new UDP handle. The actual socket is created lazily.
165 parameter are used as the socket domain. A socket will be created for the given domain.
166 If the specified domain is ``AF_UNSPEC`` no socket is created, just like :c:func:`uv_udp_init`.
190 it's required that it represents a valid datagram socket.
202 :param flags: Indicate how the socket will be bound,
377 Send data over the UDP socket. If the socket has not previously been bound
431 Prepare for receiving data. If the socket has not previously been bound
/libuv/test/
H A Dtest-not-writable-after-shutdown.c49 uv_tcp_t socket; in TEST_IMPL() local
55 r = uv_tcp_init(loop, &socket); in TEST_IMPL()
59 &socket, in TEST_IMPL()
H A Dtest-poll-close.c58 sockets[i] = socket(AF_INET, SOCK_STREAM, 0); in TEST_IMPL()
H A Dtest-poll-closesocket.c67 sock = socket(AF_INET, SOCK_STREAM, 0); in TEST_IMPL()
H A Dtest-poll-multiple-handles.c58 sock = socket(AF_INET, SOCK_STREAM, 0); in TEST_IMPL()
H A Dtest-poll-close-doesnt-corrupt-stack.c84 sock = socket(AF_INET, SOCK_STREAM, 0); in TEST_IMPL()
/libuv/docs/src/guide/
H A Dnetworking.rst4 Networking in libuv is not much different from directly using the BSD socket
7 repetitive and low-level tasks like setting up sockets using the BSD socket
8 structures, DNS lookup, and tweaking various socket parameters.
39 .. rubric:: tcp-echo-server/main.c - The listen socket
48 the BSD socket APIs. The reverse can be obtained using ``uv_ip4_name``.
81 uv_tcp_t* socket = (uv_tcp_t*)malloc(sizeof(uv_tcp_t));
82 uv_tcp_init(loop, socket);
93 pointing to the socket.
129 Then we setup a similar send socket and use ``uv_udp_send`` to send
166 restrict the socket to IPv6 only, pass the ``UV_UDP_IPV6ONLY`` flag to
[all …]
H A Dprocesses.rst241 Here we simply accept the TCP connection and pass on the socket (*stream*) to
251 The ``stdout`` of the CGI script is set to the socket so that whatever our tick
295 or new hardware is detected. The MySQL server also runs a domain socket on
301 creator/owner of the socket acting as the server. After the initial setup,
311 We name the socket ``echo.sock`` which means it will be created in the local
312 directory. This socket now behaves no different from TCP sockets as far as
315 $ socat - /path/to/socket
317 A client which wants to connect to a domain socket will use::
331 between processes by sending them over a domain socket. This allows processes
370 another file descriptor (The listening socket). Which is exactly what we do
[all …]
H A Dutilities.rst108 TCP socket is still being established and no other events are present your
227 libcurl, we can register two callbacks. The socket callback ``handle_socket``
228 is invoked whenever the state of a socket changes and we have to start polling
264 We are interested in the socket fd ``s``, and the ``action``. For every socket
266 socket using ``curl_multi_assign``. This way ``socketp`` points to it whenever
274 whenever the socket is ready for reading or writing. Calling ``uv_poll_start``
287 the correct flags. Then we call ``curl_multi_socket_action`` with the socket
H A Dbasics.rst28 * A socket has data ready to be read
50 subsystems. For example, a normal ``read`` call on a socket would block until
52 operating system to watch the socket and put an event notification in the
193 of individual actions. For example, an UDP socket is represented by
194 a ``uv_udp_t``, while individual writes to the socket use a ``uv_udp_send_t``
/libuv/docs/code/dns/
H A Dmain.c54 uv_tcp_t *socket = (uv_tcp_t*) malloc(sizeof(uv_tcp_t)); in on_resolved() local
55 uv_tcp_init(loop, socket); in on_resolved()
57 uv_tcp_connect(connect_req, socket, (const struct sockaddr*) res->ai_addr, on_connect); in on_resolved()
/libuv/include/uv/
H A Dwin.h186 (SOCKET socket,
195 (SOCKET socket,
456 SOCKET socket; \
464 SOCKET socket; \
538 SOCKET socket; \
/libuv/src/unix/
H A Dpoll.c98 uv_os_sock_t socket) { in uv_poll_init_socket() argument
99 return uv_poll_init(loop, handle, socket); in uv_poll_init_socket()
/libuv/
H A Dconfigure.ac58 AC_SEARCH_LIBS([socket], [socket])

Completed in 80 milliseconds

12