Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit a7d8139

Browse filesBrowse files
Trottevanlucas
authored andcommitted
doc: clarify use of 0 port value
Clarify that using a port value of `0` will result in the operating system identifying an available port for use. PR-URL: #7206 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: cjihrig - Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
1 parent 5e5af8b commit a7d8139
Copy full SHA for a7d8139

File tree

Expand file treeCollapse file tree

2 files changed

+4
-4
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

2 files changed

+4
-4
lines changed
Open diff view settings
Collapse file

‎doc/api/http.md‎

Copy file name to clipboardExpand all lines: doc/api/http.md
+2-2Lines changed: 2 additions & 2 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -577,8 +577,8 @@ a listener for the `'listening'` event. See also [`net.Server.listen(path)`][].
577577

578578
Begin accepting connections on the specified `port` and `hostname`. If the
579579
`hostname` is omitted, the server will accept connections on any IPv6 address
580-
(`::`) when IPv6 is available, or any IPv4 address (`0.0.0.0`) otherwise. A
581-
port value of zero will assign a random port.
580+
(`::`) when IPv6 is available, or any IPv4 address (`0.0.0.0`) otherwise. Use a
581+
port value of zero to have the operating system assign an available port.
582582

583583
To listen to a unix socket, supply a filename instead of port and hostname.
584584

Collapse file

‎doc/api/net.md‎

Copy file name to clipboardExpand all lines: doc/api/net.md
+2-2Lines changed: 2 additions & 2 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -218,8 +218,8 @@ added: v0.1.90
218218

219219
Begin accepting connections on the specified `port` and `hostname`. If the
220220
`hostname` is omitted, the server will accept connections on any IPv6 address
221-
(`::`) when IPv6 is available, or any IPv4 address (`0.0.0.0`) otherwise. A
222-
port value of zero will assign a random port.
221+
(`::`) when IPv6 is available, or any IPv4 address (`0.0.0.0`) otherwise. Use a
222+
port value of `0` to have the operating system assign an available port.
223223

224224
Backlog is the maximum length of the queue of pending connections.
225225
The actual length will be determined by the OS through sysctl settings such as

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.