mirror of
https://github.com/nodejs/node.git
synced 2024-11-21 10:59:27 +00:00
doc: sort options alphabetically
Sort options alphabetically in `doc/api/net.md`. PR-URL: https://github.com/nodejs/node/pull/52589 Reviewed-By: Paolo Insogna <paolo@cowtech.it> Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com> Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
This commit is contained in:
parent
654508bd9a
commit
ba9e1e0ffb
104
doc/api/net.md
104
doc/api/net.md
@ -476,21 +476,22 @@ changes:
|
||||
-->
|
||||
|
||||
* `options` {Object} Required. Supports the following properties:
|
||||
* `port` {number}
|
||||
* `host` {string}
|
||||
* `path` {string} Will be ignored if `port` is specified. See
|
||||
[Identifying paths for IPC connections][].
|
||||
* `backlog` {number} Common parameter of [`server.listen()`][]
|
||||
functions.
|
||||
* `exclusive` {boolean} **Default:** `false`
|
||||
* `readableAll` {boolean} For IPC servers makes the pipe readable
|
||||
for all users. **Default:** `false`.
|
||||
* `writableAll` {boolean} For IPC servers makes the pipe writable
|
||||
for all users. **Default:** `false`.
|
||||
* `host` {string}
|
||||
* `ipv6Only` {boolean} For TCP servers, setting `ipv6Only` to `true` will
|
||||
disable dual-stack support, i.e., binding to host `::` won't make
|
||||
`0.0.0.0` be bound. **Default:** `false`.
|
||||
* `signal` {AbortSignal} An AbortSignal that may be used to close a listening server.
|
||||
* `path` {string} Will be ignored if `port` is specified. See
|
||||
[Identifying paths for IPC connections][].
|
||||
* `port` {number}
|
||||
* `readableAll` {boolean} For IPC servers makes the pipe readable
|
||||
for all users. **Default:** `false`.
|
||||
* `signal` {AbortSignal} An AbortSignal that may be used to close a listening
|
||||
server.
|
||||
* `writableAll` {boolean} For IPC servers makes the pipe writable
|
||||
for all users. **Default:** `false`.
|
||||
* `callback` {Function}
|
||||
functions.
|
||||
* Returns: {net.Server}
|
||||
@ -660,18 +661,18 @@ changes:
|
||||
-->
|
||||
|
||||
* `options` {Object} Available options are:
|
||||
* `fd` {number} If specified, wrap around an existing socket with
|
||||
the given file descriptor, otherwise a new socket will be created.
|
||||
* `allowHalfOpen` {boolean} If set to `false`, then the socket will
|
||||
automatically end the writable side when the readable side ends. See
|
||||
[`net.createServer()`][] and the [`'end'`][] event for details. **Default:**
|
||||
`false`.
|
||||
* `fd` {number} If specified, wrap around an existing socket with
|
||||
the given file descriptor, otherwise a new socket will be created.
|
||||
* `readable` {boolean} Allow reads on the socket when an `fd` is passed,
|
||||
otherwise ignored. **Default:** `false`.
|
||||
* `writable` {boolean} Allow writes on the socket when an `fd` is passed,
|
||||
otherwise ignored. **Default:** `false`.
|
||||
* `signal` {AbortSignal} An Abort signal that may be used to destroy the
|
||||
socket.
|
||||
* `writable` {boolean} Allow writes on the socket when an `fd` is passed,
|
||||
otherwise ignored. **Default:** `false`.
|
||||
* Returns: {net.Socket}
|
||||
|
||||
Creates a new socket object.
|
||||
@ -996,37 +997,40 @@ this only when implementing a custom Socket.
|
||||
|
||||
For TCP connections, available `options` are:
|
||||
|
||||
* `port` {number} Required. Port the socket should connect to.
|
||||
* `host` {string} Host the socket should connect to. **Default:** `'localhost'`.
|
||||
* `localAddress` {string} Local address the socket should connect from.
|
||||
* `localPort` {number} Local port the socket should connect from.
|
||||
* `autoSelectFamily` {boolean}: If set to `true`, it enables a family
|
||||
autodetection algorithm that loosely implements section 5 of [RFC 8305][]. The
|
||||
`all` option passed to lookup is set to `true` and the sockets attempts to
|
||||
connect to all obtained IPv6 and IPv4 addresses, in sequence, until a
|
||||
connection is established. The first returned AAAA address is tried first,
|
||||
then the first returned A address, then the second returned AAAA address and
|
||||
so on. Each connection attempt (but the last one) is given the amount of time
|
||||
specified by the `autoSelectFamilyAttemptTimeout` option before timing out and
|
||||
trying the next address. Ignored if the `family` option is not `0` or if
|
||||
`localAddress` is set. Connection errors are not emitted if at least one
|
||||
connection succeeds. If all connections attempts fails, a single
|
||||
`AggregateError` with all failed attempts is emitted. **Default:**
|
||||
[`net.getDefaultAutoSelectFamily()`][].
|
||||
* `autoSelectFamilyAttemptTimeout` {number}: The amount of time in milliseconds
|
||||
to wait for a connection attempt to finish before trying the next address when
|
||||
using the `autoSelectFamily` option. If set to a positive integer less than
|
||||
`10`, then the value `10` will be used instead. **Default:**
|
||||
[`net.getDefaultAutoSelectFamilyAttemptTimeout()`][].
|
||||
* `family` {number}: Version of IP stack. Must be `4`, `6`, or `0`. The value
|
||||
`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`.
|
||||
* `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([enable][, initialDelay])`][`socket.setKeepAlive(enable, initialDelay)`].
|
||||
**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`.
|
||||
* `autoSelectFamily` {boolean}: If set to `true`, it enables a family autodetection algorithm
|
||||
that loosely implements section 5 of [RFC 8305][].
|
||||
The `all` option passed to lookup is set to `true` and the sockets attempts to connect to all
|
||||
obtained IPv6 and IPv4 addresses, in sequence, until a connection is established.
|
||||
The first returned AAAA address is tried first, then the first returned A address,
|
||||
then the second returned AAAA address and so on.
|
||||
Each connection attempt (but the last one) is given the amount of time specified by the `autoSelectFamilyAttemptTimeout` option before timing out and trying the next address.
|
||||
Ignored if the `family` option is not `0` or if `localAddress` is set.
|
||||
Connection errors are not emitted if at least one connection succeeds.
|
||||
If all connections attempts fails, a single `AggregateError` with all failed attempts is emitted.
|
||||
**Default:** [`net.getDefaultAutoSelectFamily()`][]
|
||||
* `autoSelectFamilyAttemptTimeout` {number}: The amount of time in milliseconds to wait
|
||||
for a connection attempt to finish before trying the next address when using the `autoSelectFamily` option.
|
||||
If set to a positive integer less than `10`, then the value `10` will be used instead.
|
||||
**Default:** [`net.getDefaultAutoSelectFamilyAttemptTimeout()`][]
|
||||
* `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.
|
||||
|
||||
For [IPC][] connections, available `options` are:
|
||||
|
||||
@ -1640,16 +1644,18 @@ changes:
|
||||
* `highWaterMark` {number} Optionally overrides all [`net.Socket`][]s'
|
||||
`readableHighWaterMark` and `writableHighWaterMark`.
|
||||
**Default:** See [`stream.getDefaultHighWaterMark()`][].
|
||||
* `keepAlive` {boolean} If set to `true`, it enables keep-alive functionality
|
||||
on the socket immediately after a new incoming connection is received,
|
||||
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 a new incoming connection is received.
|
||||
**Default:** `false`.
|
||||
* `pauseOnConnect` {boolean} Indicates whether the socket should be
|
||||
paused on incoming connections. **Default:** `false`.
|
||||
* `noDelay` {boolean} If set to `true`, it disables the use of Nagle's algorithm immediately
|
||||
after a new incoming connection is received. **Default:** `false`.
|
||||
* `keepAlive` {boolean} If set to `true`, it enables keep-alive functionality on the socket
|
||||
immediately after a new incoming connection is received, similarly on what is done in
|
||||
[`socket.setKeepAlive([enable][, initialDelay])`][`socket.setKeepAlive(enable, initialDelay)`].
|
||||
**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`.
|
||||
|
||||
* `connectionListener` {Function} Automatically set as a listener for the
|
||||
[`'connection'`][] event.
|
||||
@ -1872,7 +1878,7 @@ net.isIPv6('fhqwhgads'); // returns false
|
||||
[`socket.pause()`]: #socketpause
|
||||
[`socket.resume()`]: #socketresume
|
||||
[`socket.setEncoding()`]: #socketsetencodingencoding
|
||||
[`socket.setKeepAlive(enable, initialDelay)`]: #socketsetkeepaliveenable-initialdelay
|
||||
[`socket.setKeepAlive()`]: #socketsetkeepaliveenable-initialdelay
|
||||
[`socket.setTimeout()`]: #socketsettimeouttimeout-callback
|
||||
[`socket.setTimeout(timeout)`]: #socketsettimeouttimeout-callback
|
||||
[`stream.getDefaultHighWaterMark()`]: stream.md#streamgetdefaulthighwatermarkobjectmode
|
||||
|
Loading…
Reference in New Issue
Block a user