aboutsummaryrefslogtreecommitdiff
path: root/docs/src
diff options
context:
space:
mode:
Diffstat (limited to 'docs/src')
-rw-r--r--docs/src/guide/utilities.rst2
-rw-r--r--docs/src/tcp.rst29
2 files changed, 30 insertions, 1 deletions
diff --git a/docs/src/guide/utilities.rst b/docs/src/guide/utilities.rst
index 44e4370d..9a399a7f 100644
--- a/docs/src/guide/utilities.rst
+++ b/docs/src/guide/utilities.rst
@@ -435,7 +435,7 @@ As you can see this is very useful to produce nicely formatted output, or even
console based arcade games if that tickles your fancy. For fancier control you
can try `ncurses`_.
-.. _ncurses: https://www.gnu.org/software/ncurses/ncurses.html
+.. _ncurses: https://invisible-island.net/ncurses/announce.html
.. versionchanged:: 1.23.1: the `readable` parameter is now unused and ignored.
The appropriate value will now be auto-detected from the kernel.
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