|
1 | | -diff --git a/deps/uv/docs/src/tcp.rst b/deps/uv/docs/src/tcp.rst |
2 | | -index f9b203c41997d9..a17ccba5bc7e58 100644 |
3 | | ---- a/deps/uv/docs/src/tcp.rst |
4 | | -+++ b/deps/uv/docs/src/tcp.rst |
5 | | -@@ -91,6 +91,35 @@ API |
6 | | - |
7 | | - .. versionchanged:: 1.49.0 If `delay` is less than 1 then ``UV_EINVAL``` is returned. |
8 | | - |
9 | | -+.. c:function:: int uv_tcp_keepalive_ex(uv_tcp_t* handle, int on, unsigned int idle, unsigned int intvl, unsigned int cnt) |
10 | | -+ |
11 | | -+ Enable / disable TCP keep-alive with all socket options: `TCP_KEEPIDLE`, `TCP_KEEPINTVL` and `TCP_KEEPCNT`. |
12 | | -+ `idle` is the value for `TCP_KEEPIDLE`, `intvl` is the value for `TCP_KEEPINTVL`, |
13 | | -+ `cnt` is the value for `TCP_KEEPCNT`, ignored when `on` is zero. |
14 | | -+ |
15 | | -+ With TCP keep-alive enabled, `idle` is the time (in seconds) the connection needs to remain idle before |
16 | | -+ TCP starts sending keep-alive probes. `intvl` is the time (in seconds) between individual keep-alive probes. |
17 | | -+ TCP will drop the connection after sending `cnt` probes without getting any replies from the peer, then the |
18 | | -+ handle is destroyed with a ``UV_ETIMEDOUT`` error passed to the corresponding callback. |
19 | | -+ |
20 | | -+ If one of `idle`, `intvl`, or `cnt` is less than 1, ``UV_EINVAL`` is returned. |
21 | | -+ |
22 | | -+ .. versionchanged:: 1.52.0 added support of setting `TCP_KEEPINTVL` and `TCP_KEEPCNT` socket options. |
23 | | -+ |
24 | | -+ .. note:: |
25 | | -+ Ensure that the socket options are supported by the underlying operating system. |
26 | | -+ Currently supported platforms: |
27 | | -+ - AIX |
28 | | -+ - DragonFlyBSD |
29 | | -+ - FreeBSD |
30 | | -+ - HP-UX |
31 | | -+ - illumos |
32 | | -+ - Linux |
33 | | -+ - macOS |
34 | | -+ - NetBSD |
35 | | -+ - Solaris |
36 | | -+ - Windows |
37 | | -+ |
38 | | - .. c:function:: int uv_tcp_simultaneous_accepts(uv_tcp_t* handle, int enable) |
39 | | - |
40 | | - Enable / disable simultaneous asynchronous accept requests that are |
41 | 1 | diff --git a/deps/uv/include/uv.h b/deps/uv/include/uv.h |
42 | 2 | index bdd3d792cb667d..da06345557bb6c 100644 |
43 | 3 | --- a/deps/uv/include/uv.h |
@@ -451,29 +411,3 @@ index bb3808a35c27e6..e14b8b515a9935 100644 |
451 | 411 | /* |
452 | 412 | * TDI defines that are only in the DDK. |
453 | 413 | * We only need receive flags so far. |
454 | | -diff --git a/deps/uv/test/test-tcp-flags.c b/deps/uv/test/test-tcp-flags.c |
455 | | -index 16218a27f0a3a8..04a238b2c4cd49 100644 |
456 | | ---- a/deps/uv/test/test-tcp-flags.c |
457 | | -+++ b/deps/uv/test/test-tcp-flags.c |
458 | | -@@ -49,6 +49,21 @@ TEST_IMPL(tcp_flags) { |
459 | | - r = uv_tcp_keepalive(&handle, 1, 0); |
460 | | - ASSERT_EQ(r, UV_EINVAL); |
461 | | - |
462 | | -+ r = uv_tcp_keepalive_ex(&handle, 1, 60, 60, 60); |
463 | | -+ ASSERT_OK(r); |
464 | | -+ |
465 | | -+ r = uv_tcp_keepalive_ex(&handle, 0, 0, 0, 0); |
466 | | -+ ASSERT_OK(r); |
467 | | -+ |
468 | | -+ r = uv_tcp_keepalive_ex(&handle, 1, 0, 10, 10); |
469 | | -+ ASSERT_EQ(r, UV_EINVAL); |
470 | | -+ |
471 | | -+ r = uv_tcp_keepalive_ex(&handle, 1, 10, 0, 10); |
472 | | -+ ASSERT_EQ(r, UV_EINVAL); |
473 | | -+ |
474 | | -+ r = uv_tcp_keepalive_ex(&handle, 1, 10, 10, 0); |
475 | | -+ ASSERT_EQ(r, UV_EINVAL); |
476 | | -+ |
477 | | - uv_close((uv_handle_t*)&handle, NULL); |
478 | | - |
479 | | - r = uv_run(loop, UV_RUN_DEFAULT); |
0 commit comments