diff options
Diffstat (limited to 'docs/src')
-rw-r--r-- | docs/src/tcp.rst | 11 | ||||
-rw-r--r-- | docs/src/udp.rst | 9 |
2 files changed, 19 insertions, 1 deletions
diff --git a/docs/src/tcp.rst b/docs/src/tcp.rst index dd746fe8..56a27e4e 100644 --- a/docs/src/tcp.rst +++ b/docs/src/tcp.rst @@ -30,7 +30,16 @@ API .. c:function:: int uv_tcp_init(uv_loop_t*, uv_tcp_t* handle) - Initialize the handle. + Initialize the handle. No socket is created as of yet. + +.. c:function:: int uv_tcp_init_ex(uv_loop_t*, uv_tcp_t* handle, unsigned int flags) + + Initialize the handle with the specified flags. At the moment the lower 8 bits + of the `flags` parameter are used as the socket domain. A socket will be created + for the given domain. If the specified domain is ``AF_UNSPEC`` no socket is created, + just like :c:func:`uv_tcp_init`. + + .. versionadded:: 1.7.0 .. c:function:: int uv_tcp_open(uv_tcp_t* handle, uv_os_sock_t sock) diff --git a/docs/src/udp.rst b/docs/src/udp.rst index ec7ce56d..3b77b9d9 100644 --- a/docs/src/udp.rst +++ b/docs/src/udp.rst @@ -110,6 +110,15 @@ API Initialize a new UDP handle. The actual socket is created lazily. Returns 0 on success. +.. c:function:: int uv_udp_init_ex(uv_loop_t*, uv_udp_t* handle, unsigned int flags) + + Initialize the handle with the specified flags. At the moment the lower 8 bits + of the `flags` parameter are used as the socket domain. A socket will be created + for the given domain. If the specified domain is ``AF_UNSPEC`` no socket is created, + just like :c:func:`uv_udp_init`. + + .. versionadded:: 1.7.0 + .. c:function:: int uv_udp_open(uv_udp_t* handle, uv_os_sock_t sock) Opens an existing file descriptor or Windows SOCKET as a UDP handle. |