Skip to content

Commit 0a9f46b

Browse files
committed
quic: add quic
Signed-off-by: James M Snell <[email protected]>
1 parent 01d81ed commit 0a9f46b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+25874
-8
lines changed

doc/api/errors.md

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2358,6 +2358,68 @@ Accessing `Object.prototype.__proto__` has been forbidden using
23582358
[`Object.setPrototypeOf`][] should be used to get and set the prototype of an
23592359
object.
23602360

2361+
<a id="ERR_QUIC_APPLICATION_ERROR"></a>
2362+
### `ERR_QUIC_APPLICATION_ERROR`
2363+
<!-- YAML
2364+
added: REPLACEME
2365+
-->
2366+
2367+
> Stability: 1 - Experimental
2368+
2369+
Indicates that a QUIC application-level error has occurred.
2370+
2371+
<a id="ERR_QUIC_SESSION_DESTROYED"></a>
2372+
### `ERR_QUIC_SESSION_DESTROYED`
2373+
<!-- YAML
2374+
added: REPLACEME
2375+
-->
2376+
2377+
> Stability: 1 - Experimental
2378+
2379+
Indicates that a {quic.Stream} has been interrupted because it's owning
2380+
{quic.Session} has been destroyed.
2381+
2382+
<a id="ERR_QUIC_STREAM_OPEN_FAILURE"></a>
2383+
### `ERR_QUIC_STREAM_OPEN_FAILURE`
2384+
<!-- YAML
2385+
added: REPLACEME
2386+
-->
2387+
2388+
> Stability: 1 - Experimental
2389+
2390+
Indicates that a new {quic.Stream} could not be opened at this time.
2391+
2392+
<a id="ERR_QUIC_STREAM_RESET"></a>
2393+
### `ERR_QUIC_STREAM_RESET`
2394+
<!-- YAML
2395+
added: REPLACEME
2396+
-->
2397+
2398+
> Stability: 1 - Experimental
2399+
2400+
Indicates that a {quic.Stream} has been reset by the connected peer.
2401+
2402+
<a id="ERR_QUIC_TRANSPORT_ERROR"></a>
2403+
### `ERR_QUIC_TRANSPORT_ERROR`
2404+
<!-- YAML
2405+
added: REPLACEME
2406+
-->
2407+
2408+
> Stability: 1 - Experimental
2409+
2410+
Indicates that a QUIC transport-level error has occurred.
2411+
2412+
<a id="ERR_QUIC_VERSION_NEGOTIATION"></a>
2413+
### `ERR_QUIC_VERSION_NEGOTIATION`
2414+
<!-- YAML
2415+
added: REPLACEME
2416+
-->
2417+
2418+
> Stability: 1 - Experimental
2419+
2420+
Indicates that a remote QUIC peer does not support the QUIC protocol version
2421+
requested.
2422+
23612423
<a id="ERR_REQUIRE_ESM"></a>
23622424

23632425
### `ERR_REQUIRE_ESM`
@@ -3051,6 +3113,14 @@ removed: v10.0.0
30513113
Used when an action has been performed on an HTTP/2 Stream that has already
30523114
been closed.
30533115

3116+
<a id="ERR_HTTP3_HOST_OR_AUTHORITY_REQUIRED"></a>
3117+
### `ERR_HTTP3_HOST_OR_AUTHORITY_REQUIRED`
3118+
<!-- YAML
3119+
added: REPLACEME
3120+
-->
3121+
3122+
For HTTP/3, the `'host'` or '`:authority'` header must be given.
3123+
30543124
<a id="ERR_HTTP_INVALID_CHAR"></a>
30553125

30563126
### `ERR_HTTP_INVALID_CHAR`

doc/api/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
* [Process](process.md)
5050
* [Punycode](punycode.md)
5151
* [Query strings](querystring.md)
52+
* [QUIC](quic.md)
5253
* [Readline](readline.md)
5354
* [REPL](repl.md)
5455
* [Report](report.md)

doc/api/net.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,11 @@ added:
171171
- v14.18.0
172172
-->
173173

174-
* `options` {Object}
174+
* `options` {net.SocketAddressInit}
175+
176+
### `SocketAddressInit`
177+
178+
* Type: {Object}
175179
* `address` {string} The network address as either an IPv4 or IPv6 string.
176180
**Default**: `'127.0.0.1'` if `family` is `'ipv4'`; `'::'` if `family` is
177181
`'ipv6'`.
@@ -180,6 +184,18 @@ added:
180184
* `flowlabel` {number} An IPv6 flow-label used only if `family` is `'ipv6'`.
181185
* `port` {number} An IP port.
182186

187+
The `SocketAddressInit` is an ordinary JavaScript object whose properties are
188+
used to initialize a new {net.SocketAddress}.
189+
190+
```js
191+
const socketAddressInit = {
192+
address: '123.123.123.123',
193+
port: 12345
194+
};
195+
196+
const socketAddress = new net.SocketAddress(socketAddressInit);
197+
```
198+
183199
### `socketaddress.address`
184200

185201
<!-- YAML

0 commit comments

Comments
 (0)