From a7d813915e328c8209fa08b4abf1cafc2f738af8 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Tue, 7 Jun 2016 15:54:07 -0700 Subject: [PATCH] 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: https://github.com/nodejs/node/pull/7206 Reviewed-By: James M Snell Reviewed-By: cjihrig - Colin Ihrig Reviewed-By: Anna Henningsen --- doc/api/http.md | 4 ++-- doc/api/net.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/api/http.md b/doc/api/http.md index fad0e87e9ca1a4..0b5e75aeabe2cc 100644 --- a/doc/api/http.md +++ b/doc/api/http.md @@ -577,8 +577,8 @@ a listener for the `'listening'` event. See also [`net.Server.listen(path)`][]. Begin accepting connections on the specified `port` and `hostname`. If the `hostname` is omitted, the server will accept connections on any IPv6 address -(`::`) when IPv6 is available, or any IPv4 address (`0.0.0.0`) otherwise. A -port value of zero will assign a random port. +(`::`) when IPv6 is available, or any IPv4 address (`0.0.0.0`) otherwise. Use a +port value of zero to have the operating system assign an available port. To listen to a unix socket, supply a filename instead of port and hostname. diff --git a/doc/api/net.md b/doc/api/net.md index 5bd3a23722fb1c..674478e73d0699 100644 --- a/doc/api/net.md +++ b/doc/api/net.md @@ -218,8 +218,8 @@ added: v0.1.90 Begin accepting connections on the specified `port` and `hostname`. If the `hostname` is omitted, the server will accept connections on any IPv6 address -(`::`) when IPv6 is available, or any IPv4 address (`0.0.0.0`) otherwise. A -port value of zero will assign a random port. +(`::`) when IPv6 is available, or any IPv4 address (`0.0.0.0`) otherwise. Use a +port value of `0` to have the operating system assign an available port. Backlog is the maximum length of the queue of pending connections. The actual length will be determined by the OS through sysctl settings such as