Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions doc/api/http.md
Original file line number Diff line number Diff line change
Expand Up @@ -2013,10 +2013,12 @@ socketTimeout = keepAliveTimeout + keepAliveTimeoutBuffer
If the server receives new data before the keep-alive timeout has fired, it
will reset the regular inactivity timeout, i.e., [`server.timeout`][].

A value of `0` will disable the keep-alive timeout behavior on incoming
connections.
A value of `0` makes the HTTP server behave similarly to Node.js versions prior
to 8.0.0, which did not have a keep-alive timeout.
A value of `0` disables the keep-alive timeout. HTTP persistent
connections remain enabled and will stay open until closed by the
client or the server.

Disabling the timeout may increase resource usage, as idle connections
can remain open indefinitely.

The socket timeout logic is set up on connection, so changing this value only
affects new connections to the server, not any existing connections.
Expand Down
7 changes: 4 additions & 3 deletions doc/api/net.md
Original file line number Diff line number Diff line change
Expand Up @@ -767,9 +767,10 @@ changes:
access to specific IP addresses, IP ranges, or IP subnets.
* `fd` {number} If specified, wrap around an existing socket with
the given file descriptor, otherwise a new socket will be created.
* `keepAlive` {boolean} If set to `true`, it enables keep-alive functionality on
the socket immediately after the connection is established, similarly on what
is done in [`socket.setKeepAlive()`][]. **Default:** `false`.
* `keepAlive` {boolean} If set to `true`, TCP keepalive is enabled on the
socket immediately after the connection is established, equivalent to
calling [`socket.setKeepAlive()`][]. If set to `false`, TCP keepalive is
not enabled automatically. **Default:** `false`.
* `keepAliveInitialDelay` {number} If set to a positive number, it sets the
initial delay before the first keepalive probe is sent on an idle socket. **Default:** `0`.
* `noDelay` {boolean} If set to `true`, it disables the use of Nagle's algorithm
Expand Down