doc: correct options for net.Socket class and socket.connect · nodejs/node@a3dd30d

@@ -755,8 +755,17 @@ changes:

755755

automatically end the writable side when the readable side ends. See

756756

[`net.createServer()`][] and the [`'end'`][] event for details. **Default:**

757757

`false`.

758+

* `blockList` {net.BlockList} `blockList` can be used for disabling outbound

759+

access to specific IP addresses, IP ranges, or IP subnets.

758760

* `fd` {number} If specified, wrap around an existing socket with

759761

the given file descriptor, otherwise a new socket will be created.

762+

* `keepAlive` {boolean} If set to `true`, it enables keep-alive functionality on

763+

the socket immediately after the connection is established, similarly on what

764+

is done in [`socket.setKeepAlive()`][]. **Default:** `false`.

765+

* `keepAliveInitialDelay` {number} If set to a positive number, it sets the

766+

initial delay before the first keepalive probe is sent on an idle socket. **Default:** `0`.

767+

* `noDelay` {boolean} If set to `true`, it disables the use of Nagle's algorithm

768+

immediately after the socket is established. **Default:** `false`.

760769

* `onread` {Object} If specified, incoming data is stored in a single `buffer`

761770

and passed to the supplied `callback` when data arrives on the socket.

762771

This will cause the streaming functionality to not provide any data.

@@ -1119,20 +1128,10 @@ For TCP connections, available `options` are:

11191128

`0` indicates that both IPv4 and IPv6 addresses are allowed. **Default:** `0`.

11201129

* `hints` {number} Optional [`dns.lookup()` hints][].

11211130

* `host` {string} Host the socket should connect to. **Default:** `'localhost'`.

1122-

* `keepAlive` {boolean} If set to `true`, it enables keep-alive functionality on

1123-

the socket immediately after the connection is established, similarly on what

1124-

is done in [`socket.setKeepAlive()`][]. **Default:** `false`.

1125-

* `keepAliveInitialDelay` {number} If set to a positive number, it sets the

1126-

initial delay before the first keepalive probe is sent on an idle socket.

1127-

**Default:** `0`.

11281131

* `localAddress` {string} Local address the socket should connect from.

11291132

* `localPort` {number} Local port the socket should connect from.

11301133

* `lookup` {Function} Custom lookup function. **Default:** [`dns.lookup()`][].

1131-

* `noDelay` {boolean} If set to `true`, it disables the use of Nagle's algorithm

1132-

immediately after the socket is established. **Default:** `false`.

11331134

* `port` {number} Required. Port the socket should connect to.

1134-

* `blockList` {net.BlockList} `blockList` can be used for disabling outbound

1135-

access to specific IP addresses, IP ranges, or IP subnets.

1136113511371136

For [IPC][] connections, available `options` are:

11381137