mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
doc: correct options for net.Socket class and socket.connect
blockList, keepAlive, keepAliveInitialDelay and noDelay are wrongly documented for socket.connect options and missing on net.Socket constructor options documentation Fixes: https://github.com/nodejs/node/issues/59823 PR-URL: https://github.com/nodejs/node/pull/61179 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
This commit is contained in:
@@ -759,8 +759,17 @@ changes:
|
||||
automatically end the writable side when the readable side ends. See
|
||||
[`net.createServer()`][] and the [`'end'`][] event for details. **Default:**
|
||||
`false`.
|
||||
* `blockList` {net.BlockList} `blockList` can be used for disabling outbound
|
||||
access to specific IP addresses, IP ranges, or IP subnets.
|
||||
* `fd` {number} If specified, wrap around an existing socket with
|
||||
the given file descriptor, otherwise a new socket will be created.
|
||||
* `keepAlive` {boolean} If set to `true`, it enables keep-alive functionality on
|
||||
the socket immediately after the connection is established, similarly on what
|
||||
is done in [`socket.setKeepAlive()`][]. **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`.
|
||||
* `noDelay` {boolean} If set to `true`, it disables the use of Nagle's algorithm
|
||||
immediately after the socket is established. **Default:** `false`.
|
||||
* `onread` {Object} If specified, incoming data is stored in a single `buffer`
|
||||
and passed to the supplied `callback` when data arrives on the socket.
|
||||
This will cause the streaming functionality to not provide any data.
|
||||
@@ -1123,20 +1132,10 @@ For TCP connections, available `options` are:
|
||||
`0` indicates that both IPv4 and IPv6 addresses are allowed. **Default:** `0`.
|
||||
* `hints` {number} Optional [`dns.lookup()` hints][].
|
||||
* `host` {string} Host the socket should connect to. **Default:** `'localhost'`.
|
||||
* `keepAlive` {boolean} If set to `true`, it enables keep-alive functionality on
|
||||
the socket immediately after the connection is established, similarly on what
|
||||
is done in [`socket.setKeepAlive()`][]. **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`.
|
||||
* `localAddress` {string} Local address the socket should connect from.
|
||||
* `localPort` {number} Local port the socket should connect from.
|
||||
* `lookup` {Function} Custom lookup function. **Default:** [`dns.lookup()`][].
|
||||
* `noDelay` {boolean} If set to `true`, it disables the use of Nagle's algorithm
|
||||
immediately after the socket is established. **Default:** `false`.
|
||||
* `port` {number} Required. Port the socket should connect to.
|
||||
* `blockList` {net.BlockList} `blockList` can be used for disabling outbound
|
||||
access to specific IP addresses, IP ranges, or IP subnets.
|
||||
|
||||
For [IPC][] connections, available `options` are:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user