diff --git a/doc/api/net.md b/doc/api/net.md index 91766ad8e0f2d2..eca3c1ffcfec83 100644 --- a/doc/api/net.md +++ b/doc/api/net.md @@ -935,7 +935,7 @@ For TCP connections, available `options` are: * `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:** `250`. + **Default:** initially `250`, but it can be changed at runtime using [`net.setDefaultAutoSelectFamilyAttemptTimeout(value)`][] For [IPC][] connections, available `options` are: @@ -1520,26 +1520,6 @@ immediately initiates connection with [`socket.connect(port[, host][, connectListener])`][`socket.connect(port)`], then returns the `net.Socket` that starts the connection. -## `net.setDefaultAutoSelectFamily(value)` - - - -Sets the default value of the `autoSelectFamily` option of [`socket.connect(options)`][]. - -* `value` {boolean} The new default value. The initial default value is `false`. - -## `net.getDefaultAutoSelectFamily()` - - - -Gets the current default value of the `autoSelectFamily` option of [`socket.connect(options)`][]. - -* Returns: {boolean} The current default value of the `autoSelectFamily` option. - ## `net.createServer([options][, connectionListener])` + +Gets the current default value of the `autoSelectFamily` option of [`socket.connect(options)`][]. + +* Returns: {boolean} The current default value of the `autoSelectFamily` option. + +## `net.setDefaultAutoSelectFamily(value)` + + + +Sets the default value of the `autoSelectFamily` option of [`socket.connect(options)`][]. + +* `value` {boolean} The new default value. The initial default value is `false`. + +## `net.getDefaultAutoSelectFamilyAttemptTimeout()` + + + +Gets the current default value of the `autoSelectFamilyAttemptTimeout` option of [`socket.connect(options)`][]. + +* Returns: {number} The current default value of the `autoSelectFamilyAttemptTimeout` option. + +## `net.setDefaultAutoSelectFamilyAttemptTimeout(value)` + + + +Sets the default value of the `autoSelectFamilyAttemptTimeout` option of [`socket.connect(options)`][]. + +* `value` {number} The new default value, which must be a positive number. If the number is less than `10`, + the value `10` is used insted The initial default value is `250`. + ## `net.isIP(input)`