Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

quic: add quic #38233

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
70 changes: 70 additions & 0 deletions doc/api/errors.md
Original file line number Diff line number Diff line change
Expand Up @@ -2358,6 +2358,68 @@ Accessing `Object.prototype.__proto__` has been forbidden using
[`Object.setPrototypeOf`][] should be used to get and set the prototype of an
object.

<a id="ERR_QUIC_APPLICATION_ERROR"></a>
### `ERR_QUIC_APPLICATION_ERROR`
<!-- YAML
added: REPLACEME
-->

> Stability: 1 - Experimental

Indicates that a QUIC application-level error has occurred.

<a id="ERR_QUIC_SESSION_DESTROYED"></a>
### `ERR_QUIC_SESSION_DESTROYED`
<!-- YAML
added: REPLACEME
-->

> Stability: 1 - Experimental

Indicates that a {quic.Stream} has been interrupted because it's owning
{quic.Session} has been destroyed.

<a id="ERR_QUIC_STREAM_OPEN_FAILURE"></a>
### `ERR_QUIC_STREAM_OPEN_FAILURE`
<!-- YAML
added: REPLACEME
-->

> Stability: 1 - Experimental

Indicates that a new {quic.Stream} could not be opened at this time.

<a id="ERR_QUIC_STREAM_RESET"></a>
### `ERR_QUIC_STREAM_RESET`
<!-- YAML
added: REPLACEME
-->

> Stability: 1 - Experimental

Indicates that a {quic.Stream} has been reset by the connected peer.

<a id="ERR_QUIC_TRANSPORT_ERROR"></a>
### `ERR_QUIC_TRANSPORT_ERROR`
<!-- YAML
added: REPLACEME
-->

> Stability: 1 - Experimental

Indicates that a QUIC transport-level error has occurred.

<a id="ERR_QUIC_VERSION_NEGOTIATION"></a>
### `ERR_QUIC_VERSION_NEGOTIATION`
<!-- YAML
added: REPLACEME
-->

> Stability: 1 - Experimental

Indicates that a remote QUIC peer does not support the QUIC protocol version
requested.

<a id="ERR_REQUIRE_ESM"></a>

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

<a id="ERR_HTTP3_HOST_OR_AUTHORITY_REQUIRED"></a>
### `ERR_HTTP3_HOST_OR_AUTHORITY_REQUIRED`
<!-- YAML
added: REPLACEME
-->

For HTTP/3, the `'host'` or '`:authority'` header must be given.

<a id="ERR_HTTP_INVALID_CHAR"></a>

### `ERR_HTTP_INVALID_CHAR`
Expand Down
1 change: 1 addition & 0 deletions doc/api/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
* [Process](process.md)
* [Punycode](punycode.md)
* [Query strings](querystring.md)
* [QUIC](quic.md)
* [Readline](readline.md)
* [REPL](repl.md)
* [Report](report.md)
Expand Down
18 changes: 17 additions & 1 deletion doc/api/net.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,11 @@ added:
- v14.18.0
-->

* `options` {Object}
* `options` {net.SocketAddressInit}

### `SocketAddressInit`

* Type: {Object}
* `address` {string} The network address as either an IPv4 or IPv6 string.
**Default**: `'127.0.0.1'` if `family` is `'ipv4'`; `'::'` if `family` is
`'ipv6'`.
Expand All @@ -180,6 +184,18 @@ added:
* `flowlabel` {number} An IPv6 flow-label used only if `family` is `'ipv6'`.
* `port` {number} An IP port.

The `SocketAddressInit` is an ordinary JavaScript object whose properties are
used to initialize a new {net.SocketAddress}.

```js
const socketAddressInit = {
address: '123.123.123.123',
port: 12345
};

const socketAddress = new net.SocketAddress(socketAddressInit);
```

### `socketaddress.address`

<!-- YAML
Expand Down