Skip to content

Commit 633ec0c

Browse files
committed
doc: reword ambigous docs for socket.setNoDelay
1 parent 769f63c commit 633ec0c

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

doc/api/http.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1521,7 +1521,7 @@ There are a few special headers that should be noted.
15211521
[`response.writeContinue()`]: #http_response_writecontinue
15221522
[`response.writeHead()`]: #http_response_writehead_statuscode_statusmessage_headers
15231523
[`socket.setKeepAlive()`]: net.html#net_socket_setkeepalive_enable_initialdelay
1524-
[`socket.setNoDelay()`]: net.html#net_socket_setnodelay_nodelay
1524+
[`socket.setNoDelay()`]: net.html#net_socket_setnodelay_enable
15251525
[`socket.setTimeout()`]: net.html#net_socket_settimeout_timeout_callback
15261526
[`TypeError`]: errors.html#errors_class_typeerror
15271527
[`url.parse()`]: url.html#url_url_parse_urlstring_parsequerystring_slashesdenotehost

doc/api/net.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -625,15 +625,16 @@ initialDelay will leave the value unchanged from the default
625625

626626
Returns `socket`.
627627

628-
### socket.setNoDelay([noDelay])
628+
### socket.setNoDelay([enable])
629629
<!-- YAML
630630
added: v0.1.90
631631
-->
632632

633-
Disables the Nagle algorithm. By default TCP connections use the Nagle
634-
algorithm, they buffer data before sending it off. Setting `true` for
635-
`noDelay` will immediately fire off data each time `socket.write()` is called.
636-
`noDelay` defaults to `true`.
633+
Sets `noDelay` option, which disables the Nagle algorithm. By default TCP
634+
connections use the Nagle algorithm, they buffer data before sending it off.
635+
Setting `true` for `noDelay` will immediately fire off data each time
636+
`socket.write()` is called.
637+
`enable` defaults to `true`.
637638

638639
Returns `socket`.
639640

0 commit comments

Comments
 (0)