Skip to content
Closed
Changes from 3 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
13 changes: 10 additions & 3 deletions doc/api/net.md
Original file line number Diff line number Diff line change
Expand Up @@ -879,9 +879,16 @@ added: v0.1.90
* `noDelay` {boolean} **Default:** `true`
* Returns: {net.Socket} The socket itself.

Disables the Nagle algorithm. By default TCP connections use the Nagle
algorithm, they buffer data before sending it off. Setting `true` for
`noDelay` will immediately fire off data each time `socket.write()` is called.
Enable/disable the Nagle algorithm.
Comment thread
rustyconover marked this conversation as resolved.
Outdated

When TCP connections are created have the Nagle algorithm enabled.
Comment thread
rustyconover marked this conversation as resolved.
Outdated

The Nagle algorithm delays data before it is sent via the network. It attempts
Comment thread
rustyconover marked this conversation as resolved.
Outdated
to optimize throughput at the expense of latency.

Passing `true` for `noDelay` or not passing an argument will disable the Nagle
Comment thread
rustyconover marked this conversation as resolved.
Outdated
algorithm for the socket. Passing `false` for `noDelay` will enable the Nagle
Comment thread
rustyconover marked this conversation as resolved.
Outdated
algorithm.

### `socket.setTimeout(timeout[, callback])`
<!-- YAML
Expand Down