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 85f70b3

Browse filesBrowse files
TrottMyles Borins
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 57ba51e commit 85f70b3
Copy full SHA for 85f70b3

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
@@ -532,8 +532,8 @@ a listener for the `'listening'` event. See also [`net.Server.listen(path)`][].
532532

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

538538
To listen to a unix socket, supply a filename instead of port and hostname.
539539

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
@@ -178,8 +178,8 @@ The parameter `backlog` behaves the same as in
178178

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

184184
Backlog is the maximum length of the queue of pending connections.
185185
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.