@@ -224,8 +224,14 @@ added: v0.1.90
224
224
-->
225
225
226
226
Begin 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
+
229
235
Omit the port argument, or use a port value of ` 0 ` , to have the operating system
230
236
assign a random port, which can be retrieved by using ` server.address().port `
231
237
after the ` 'listening' ` event has been emitted.
@@ -941,3 +947,5 @@ Returns true if input is a version 6 IP address, otherwise returns false.
941
947
[ `socket.setTimeout()` ] : #net_socket_settimeout_timeout_callback
942
948
[ `stream.setEncoding()` ] : stream.html#stream_readable_setencoding_encoding
943
949
[ 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