@@ -224,8 +224,14 @@ added: v0.1.90
224224-->
225225
226226Begin accepting connections on the specified ` port ` and ` hostname ` . If the
227- ` hostname ` is omitted, the server will accept connections on any IPv6 address
228- (` :: ` ) when IPv6 is available, or any IPv4 address (` 0.0.0.0 ` ) otherwise.
227+ ` hostname ` is omitted, the server will accept connections on the
228+ [ unspecified IPv6 address] [ ] (` :: ` ) when IPv6 is available, or the
229+ [ unspecified IPv4 address] [ ] (` 0.0.0.0 ` ) otherwise.
230+
231+ * Note* : in most operating systems, listening to the
232+ [ unspecified IPv6 address] [ ] (` :: ` ) may cause the ` net.Server ` to also listen on
233+ the [ unspecified IPv4 address] [ ] (` 0.0.0.0 ` ).
234+
229235Omit the port argument, or use a port value of ` 0 ` , to have the operating system
230236assign a random port, which can be retrieved by using ` server.address().port `
231237after the ` 'listening' ` event has been emitted.
@@ -941,3 +947,5 @@ Returns true if input is a version 6 IP address, otherwise returns false.
941947[ `socket.setTimeout()` ] : #net_socket_settimeout_timeout_callback
942948[ `stream.setEncoding()` ] : stream.html#stream_readable_setencoding_encoding
943949[ Readable Stream ] : stream.html#stream_class_stream_readable
950+ [ unspecified IPv6 address ] : https://en.wikipedia.org/wiki/IPv6_address#Unspecified_address
951+ [ unspecified IPv4 address ] : https://en.wikipedia.org/wiki/0.0.0.0
0 commit comments