diff options
Diffstat (limited to 'docs/src')
-rw-r--r-- | docs/src/pipe.rst | 2 | ||||
-rw-r--r-- | docs/src/tcp.rst | 29 |
2 files changed, 30 insertions, 1 deletions
diff --git a/docs/src/pipe.rst b/docs/src/pipe.rst index 4abdc65e..bb77f90e 100644 --- a/docs/src/pipe.rst +++ b/docs/src/pipe.rst @@ -94,7 +94,7 @@ API Paths on Unix get truncated to ``sizeof(sockaddr_un.sun_path)`` bytes, typically between 92 and 108 bytes. -.. c:function:: void uv_pipe_connect2(uv_connect_t* req, uv_pipe_t* handle, const char* name, size_t namelen, unsigned int flags, uv_connect_cb cb) +.. c:function:: int uv_pipe_connect2(uv_connect_t* req, uv_pipe_t* handle, const char* name, size_t namelen, unsigned int flags, uv_connect_cb cb) Connect to the Unix domain socket or the Windows named pipe. diff --git a/docs/src/tcp.rst b/docs/src/tcp.rst index f9b203c4..a17ccba5 100644 --- a/docs/src/tcp.rst +++ b/docs/src/tcp.rst @@ -91,6 +91,35 @@ API .. versionchanged:: 1.49.0 If `delay` is less than 1 then ``UV_EINVAL``` is returned. +.. c:function:: int uv_tcp_keepalive_ex(uv_tcp_t* handle, int on, unsigned int idle, unsigned int intvl, unsigned int cnt) + + Enable / disable TCP keep-alive with all socket options: `TCP_KEEPIDLE`, `TCP_KEEPINTVL` and `TCP_KEEPCNT`. + `idle` is the value for `TCP_KEEPIDLE`, `intvl` is the value for `TCP_KEEPINTVL`, + `cnt` is the value for `TCP_KEEPCNT`, ignored when `on` is zero. + + With TCP keep-alive enabled, `idle` is the time (in seconds) the connection needs to remain idle before + TCP starts sending keep-alive probes. `intvl` is the time (in seconds) between individual keep-alive probes. + TCP will drop the connection after sending `cnt` probes without getting any replies from the peer, then the + handle is destroyed with a ``UV_ETIMEDOUT`` error passed to the corresponding callback. + + If one of `idle`, `intvl`, or `cnt` is less than 1, ``UV_EINVAL`` is returned. + + .. versionchanged:: 1.52.0 added support of setting `TCP_KEEPINTVL` and `TCP_KEEPCNT` socket options. + + .. note:: + Ensure that the socket options are supported by the underlying operating system. + Currently supported platforms: + - AIX + - DragonFlyBSD + - FreeBSD + - HP-UX + - illumos + - Linux + - macOS + - NetBSD + - Solaris + - Windows + .. c:function:: int uv_tcp_simultaneous_accepts(uv_tcp_t* handle, int enable) Enable / disable simultaneous asynchronous accept requests that are |