Skip to content
Closed
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
18 changes: 10 additions & 8 deletions doc/api/http.md
Original file line number Diff line number Diff line change
Expand Up @@ -2016,10 +2016,9 @@ 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 only this idle keep-alive timeout. HTTP keep-alive
connections may remain open until the client closes them, the server closes
them, or another timeout applies.

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 Expand Up @@ -3717,10 +3716,13 @@ changes:
a comma (`, `) instead of discarding the duplicates.
For more information, refer to [`message.headers`][].
**Default:** `false`.
* `keepAlive` {boolean} If set to `true`, it enables keep-alive functionality
on the socket immediately after a new incoming connection is received,
similarly on what is done in \[`socket.setKeepAlive([enable][, initialDelay])`]\[`socket.setKeepAlive(enable, initialDelay)`].
**Default:** `false`.
* `keepAlive` {boolean} If set to `true`, enables TCP keep-alive on the
socket immediately after a new incoming connection is received, similarly
to what is done in \[`socket.setKeepAlive([enable][, initialDelay])`]\[`socket.setKeepAlive(enable, initialDelay)`].
If `false`, no call to
\[`socket.setKeepAlive([enable][, initialDelay])`]\[`socket.setKeepAlive(enable, initialDelay)`]
is made. This does not disable HTTP persistent connections. **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`.
Expand Down
8 changes: 4 additions & 4 deletions doc/api/net.md
Original file line number Diff line number Diff line change
Expand Up @@ -1818,10 +1818,10 @@ changes:
* `highWaterMark` {number} Optionally overrides all [`net.Socket`][]s'
`readableHighWaterMark` and `writableHighWaterMark`.
**Default:** See [`stream.getDefaultHighWaterMark()`][].
* `keepAlive` {boolean} If set to `true`, it enables keep-alive functionality
on the socket immediately after a new incoming connection is received,
similarly on what is done in [`socket.setKeepAlive()`][]. **Default:**
`false`.
* `keepAlive` {boolean} If set to `true`, enables TCP keep-alive on the
socket immediately after a new incoming connection is received, similarly
to what is done in [`socket.setKeepAlive()`][]. If `false`, no call to
[`socket.setKeepAlive()`][] is made. **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`.
Expand Down