Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions doc/api/net.md
Original file line number Diff line number Diff line change
Expand Up @@ -618,8 +618,8 @@ For TCP connections, available `options` are:
* `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.
* `family` {number}: Version of IP stack, can be either `4` or `6`.
**Default:** `4`.
* `family` {number}: Version of IP stack. Must be `4`, `6`, or `0`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This may not be worth "fixing" as the fix may make the documentation more confusing while helping no one, but strictly speaking, if you pass a string value for family, it will work too. So both the {number} designation and the list of acceptable values are too narrow.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(If that is worth fixing, it probably should go in a different pull request as it might result in discussion that this change as-is probably won't. Might as well get this in and then "fix" the above either later or never.)

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

Expand Down