Skip to content

Commit 643d099

Browse files
cjihrigtargos
authored andcommitted
doc: document family:0 behavior in socket.connect
Now that family:0 is documented in socket.connect(), add an explanation of what it means since 0 is not an IP family. PR-URL: #28574 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
1 parent a24ab56 commit 643d099

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎doc/api/net.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -618,8 +618,8 @@ For TCP connections, available `options` are:
618618
*`host` {string} Host the socket should connect to. **Default:**`'localhost'`.
619619
*`localAddress` {string} Local address the socket should connect from.
620620
*`localPort` {number} Local port the socket should connect from.
621-
*`family` {number}: Version of IP stack. Must be `4`, `6`, or `0`.
622-
**Default:**`0`.
621+
*`family` {number}: Version of IP stack. Must be `4`, `6`, or `0`. The value
622+
`0` indicates that both IPv4 and IPv6 addresses are allowed. **Default:**`0`.
623623
*`hints` {number} Optional [`dns.lookup()` hints][].
624624
*`lookup` {Function} Custom lookup function. **Default:**[`dns.lookup()`][].
625625

0 commit comments

Comments
 (0)