From 633ec0cdced82c5c7ac49b11be1c1a24c6b49efe Mon Sep 17 00:00:00 2001 From: Aleksei Khudiakov Date: Sun, 7 Aug 2016 00:41:00 +1000 Subject: [PATCH] doc: reword ambigous docs for socket.setNoDelay --- doc/api/http.md | 2 +- doc/api/net.md | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/doc/api/http.md b/doc/api/http.md index d263068bd68fc0..9ecdab60b90bd1 100644 --- a/doc/api/http.md +++ b/doc/api/http.md @@ -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 diff --git a/doc/api/net.md b/doc/api/net.md index d58d00edbdba2b..0aedfde5695fbd 100644 --- a/doc/api/net.md +++ b/doc/api/net.md @@ -625,15 +625,16 @@ initialDelay will leave the value unchanged from the default Returns `socket`. -### socket.setNoDelay([noDelay]) +### socket.setNoDelay([enable]) -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`.