Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorOuyang Yadong <oyydoibh@gmail.com>2018-10-21 10:59:38 +0300
committerRod Vagg <rod@vagg.org>2018-11-28 03:25:32 +0300
commita1254a3e9004b46278a68de3ef932d8b857d3c36 (patch)
tree71052702e97807733128ceb93548e62fe2bb9746 /doc
parent8fcf3b3c59deb2a96ce8d0fceb8b9a79df770d64 (diff)
net,dgram: add ipv6Only option for net and dgram
For TCP servers, the dual-stack support is enable by default, i.e. binding host "::" will also make "0.0.0.0" bound. This commit add ipv6Only option in `net.Server.listen()` and `dgram.createSocket()` methods which allows to disable dual-stack support. Support for cluster module is also provided in this commit. Fixes: https://github.com/nodejs/node/issues/17664 PR-URL: https://github.com/nodejs/node/pull/23798 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'doc')
-rw-r--r--doc/api/dgram.md6
-rw-r--r--doc/api/net.md7
2 files changed, 13 insertions, 0 deletions
diff --git a/doc/api/dgram.md b/doc/api/dgram.md
index e263627723a..31abaf450c5 100644
--- a/doc/api/dgram.md
+++ b/doc/api/dgram.md
@@ -601,6 +601,9 @@ changes:
pr-url: https://github.com/nodejs/node/pull/13623
description: The `recvBufferSize` and `sendBufferSize` options are
supported now.
+ - version: REPLACEME
+ pr-url: https://github.com/nodejs/node/pull/23798
+ description: The `ipv6Only` option is supported.
-->
* `options` {Object} Available options are:
@@ -609,6 +612,9 @@ changes:
* `reuseAddr` {boolean} When `true` [`socket.bind()`][] will reuse the
address, even if another process has already bound a socket on it.
**Default:** `false`.
+ * `ipv6Only` {boolean} Setting `ipv6Only` to `true` will
+ disable dual-stack support, i.e., binding to address `::` won't make
+ `0.0.0.0` be bound. **Default:** `false`.
* `recvBufferSize` {number} - Sets the `SO_RCVBUF` socket value.
* `sendBufferSize` {number} - Sets the `SO_SNDBUF` socket value.
* `lookup` {Function} Custom lookup function. **Default:** [`dns.lookup()`][].
diff --git a/doc/api/net.md b/doc/api/net.md
index b925245e7a3..35fb0a61713 100644
--- a/doc/api/net.md
+++ b/doc/api/net.md
@@ -252,6 +252,10 @@ Listening on a file descriptor is not supported on Windows.
#### server.listen(options[, callback])
<!-- YAML
added: v0.11.14
+changes:
+ - version: REPLACEME
+ pr-url: https://github.com/nodejs/node/pull/23798
+ description: The `ipv6Only` option is supported.
-->
* `options` {Object} Required. Supports the following properties:
@@ -266,6 +270,9 @@ added: v0.11.14
for all users. **Default:** `false`
* `writableAll` {boolean} For IPC servers makes the pipe writable
for all users. **Default:** `false`
+ * `ipv6Only` {boolean} For TCP servers, setting `ipv6Only` to `true` will
+ disable dual-stack support, i.e., binding to host `::` won't make
+ `0.0.0.0` be bound. **Default:** `false`.
* `callback` {Function} Common parameter of [`server.listen()`][]
functions.
* Returns: {net.Server}