Skip to content

Commit

Permalink
doc: reword ambigous docs for socket.setNoDelay
Browse files Browse the repository at this point in the history
  • Loading branch information
Xerkus committed Aug 7, 2016
1 parent 769f63c commit 633ec0c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion doc/api/http.md
Original file line number Diff line number Diff line change
Expand Up @@ -1521,7 +1521,7 @@ There are a few special headers that should be noted.
[`response.writeContinue()`]: #http_response_writecontinue
[`response.writeHead()`]: #http_response_writehead_statuscode_statusmessage_headers
[`socket.setKeepAlive()`]: net.html#net_socket_setkeepalive_enable_initialdelay
[`socket.setNoDelay()`]: net.html#net_socket_setnodelay_nodelay
[`socket.setNoDelay()`]: net.html#net_socket_setnodelay_enable
[`socket.setTimeout()`]: net.html#net_socket_settimeout_timeout_callback
[`TypeError`]: errors.html#errors_class_typeerror
[`url.parse()`]: url.html#url_url_parse_urlstring_parsequerystring_slashesdenotehost
Expand Down
11 changes: 6 additions & 5 deletions doc/api/net.md
Original file line number Diff line number Diff line change
Expand Up @@ -625,15 +625,16 @@ initialDelay will leave the value unchanged from the default

Returns `socket`.

### socket.setNoDelay([noDelay])
### socket.setNoDelay([enable])
<!-- YAML
added: v0.1.90
-->

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.
`noDelay` defaults to `true`.
Sets `noDelay` option, which 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` defaults to `true`.

Returns `socket`.

Expand Down

0 comments on commit 633ec0c

Please sign in to comment.