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
diff options
context:
space:
mode:
authorJames M Snell <jasnell@gmail.com>2020-06-18 04:06:29 +0300
committerJames M Snell <jasnell@gmail.com>2020-06-22 20:58:20 +0300
commitc7d859e756794fdc1460444eb238affd432b7fd6 (patch)
tree3bfd31e6b767e511ada232fbc1b428894abb0740 /doc/api/quic.md
parent1b7434dfc0c84c906132b064e6ea6f1cd76edff6 (diff)
quic: refactor and improve ipv6Only
Ignore `ipv6Only: true` when binding to `'udp4'` (this differs from dgram which will still attempt to apply the flag and will fail during bind). Improve the test so that it should work consistently. Signed-off-by: James M Snell <jasnell@gmail.com> PR-URL: https://github.com/nodejs/node/pull/33935 Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Anna Henningsen <anna@addaleax.net>
Diffstat (limited to 'doc/api/quic.md')
-rw-r--r--doc/api/quic.md21
1 files changed, 15 insertions, 6 deletions
diff --git a/doc/api/quic.md b/doc/api/quic.md
index fb00f441530..f27ad221548 100644
--- a/doc/api/quic.md
+++ b/doc/api/quic.md
@@ -261,8 +261,11 @@ added: REPLACEME
to an IP address.
* `port` {number} The local port to bind to.
* `type` {string} Either `'udp4'` or `'upd6'` to use either IPv4 or IPv6,
- respectively.
- * `ipv6Only` {boolean}
+ respectively. **Default**: `'udp4'`.
+ * `ipv6Only` {boolean} If `type` is `'udp6'`, then setting `ipv6Only` to
+ `true` will disable dual-stack support on the UDP binding -- that is,
+ binding to address `'::'` will not make `'0.0.0.0'` be bound. The option
+ is ignored if `type` is `'udp4'`. **Default**: `false`.
* `lookup` {Function} A custom DNS lookup function. Default `dns.lookup()`.
* `maxConnections` {number} The maximum number of total active inbound
connections.
@@ -1387,8 +1390,11 @@ added: REPLACEME
to an IP address.
* `port` {number} The local port to bind to.
* `type` {string} Either `'udp4'` or `'upd6'` to use either IPv4 or IPv6,
- respectively.
- * `ipv6Only` {boolean}
+ respectively. **Default**: `'udp4'`.
+ * `ipv6Only` {boolean} If `type` is `'udp6'`, then setting `ipv6Only` to
+ `true` will disable dual-stack support on the UDP binding -- that is,
+ binding to address `'::'` will not make `'0.0.0.0'` be bound. The option
+ is ignored if `type` is `'udp4'`. **Default**: `false`.
* Returns: {QuicEndpoint}
Creates and adds a new `QuicEndpoint` to the `QuicSocket` instance.
@@ -1519,7 +1525,10 @@ added: REPLACEME
`SSL_OP_CIPHER_SERVER_PREFERENCE` to be set in `secureOptions`, see
[OpenSSL Options][] for more information.
* `idleTimeout` {number}
- * `ipv6Only` {boolean}
+ * `ipv6Only` {boolean} If `type` is `'udp6'`, then setting `ipv6Only` to
+ `true` will disable dual-stack support on the UDP binding -- that is,
+ binding to address `'::'` will not make `'0.0.0.0'` be bound. The option
+ is ignored if `type` is `'udp4'`. **Default**: `false`.
* `key` {string|string[]|Buffer|Buffer[]|Object[]} Private keys in PEM format.
PEM allows the option of private keys being encrypted. Encrypted keys will
be decrypted with `options.passphrase`. Multiple keys using different
@@ -1578,7 +1587,7 @@ added: REPLACEME
`QuicClientSession` object.
* `type`: {string} Identifies the type of UDP socket. The value must either
be `'udp4'`, indicating UDP over IPv4, or `'udp6'`, indicating UDP over
- IPv6. Defaults to `'udp4'`.
+ IPv6. **Default**: `'udp4'`.
Create a new `QuicClientSession`. This function can be called multiple times
to create sessions associated with different endpoints on the same