aboutsummaryrefslogtreecommitdiff
path: root/src/unix/stream.c
diff options
context:
space:
mode:
authorAndy Pan <i@andypan.me>2025-05-21 14:43:53 +0800
committerGitHub <noreply@github.com>2025-05-21 08:43:53 +0200
commit3a9a6e3e6bc78565ddf94cf462c9877c1004bb62 (patch)
treed684b2e44f5dc44ac608ca681422dc9f33c142a6 /src/unix/stream.c
parent71ec5c0fcdd867b64c46ade1e0a6b59101281a4a (diff)
downloadlibuv-main.tar.gz
libuv-main.zip
tcp: support customizing TCP_KEEPINTVL and TCP_KEEPCNTHEADv1.xmain
Implement `uv_tcp_keepalive_ex` function that extends `uv_tcp_keepalive` to support `TCP_KEEPINTVL` and `TCP_KEEPCN` socket options in addition to TCP_KEEPIDLE.
Diffstat (limited to 'src/unix/stream.c')
-rw-r--r--src/unix/stream.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/unix/stream.c b/src/unix/stream.c
index 18763b47..204f5a25 100644
--- a/src/unix/stream.c
+++ b/src/unix/stream.c
@@ -417,7 +417,7 @@ int uv__stream_open(uv_stream_t* stream, int fd, int flags) {
/* TODO Use delay the user passed in. */
if ((stream->flags & UV_HANDLE_TCP_KEEPALIVE) &&
- uv__tcp_keepalive(fd, 1, 60)) {
+ uv__tcp_keepalive(fd, 1, 60, 1, 10)) {
return UV__ERR(errno);
}
}