Skip to content

Commit 90fbf0e

Browse files
EduardF1richardlau
authored andcommitted
doc: clarify QUIC stream state wording
When the body option is omitted, no FIN is sent immediately and the stream's outgoing side remains writable. The stream can still be written later via stream.setBody() or the writer. Avoid describing the outgoing stream itself as half-closed, since the outgoing side is one half of the stream state. Fixes: #63655 Signed-off-by: EduardF1 <50618110+EduardF1@users.noreply.github.com> PR-URL: #63660 Reviewed-By: Stephen Belanger <admin@stephenbelanger.com> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent 9548cbc commit 90fbf0e

1 file changed

Lines changed: 8 additions & 5 deletions

File tree

doc/api/quic.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1280,8 +1280,8 @@ added: v23.8.0
12801280
* `body` {string | ArrayBuffer | SharedArrayBuffer | ArrayBufferView |
12811281
Blob | FileHandle | AsyncIterable | Iterable | Promise | null}
12821282
The outbound body source. See [`stream.setBody()`][] for details on
1283-
supported types. When omitted, the stream starts half-closed (writable
1284-
side open, no body queued).
1283+
supported types. When omitted, the stream's outgoing side remains
1284+
writable with no body queued; no FIN is sent immediately.
12851285
* `headers` {Object} Initial request or response headers to send. Only
12861286
used when the session supports headers (e.g. HTTP/3). If `body` is not
12871287
specified and `headers` is provided, the stream is treated as
@@ -1308,7 +1308,8 @@ added: v23.8.0
13081308
* Returns: {Promise} for a {quic.QuicStream}
13091309

13101310
Open a new bidirectional stream. If the `body` option is not specified,
1311-
the outgoing stream will be half-closed. The `priority` and `incremental`
1311+
the stream's outgoing side remains writable and no FIN is sent
1312+
immediately. The `priority` and `incremental`
13121313
options are only used when the session supports priority (e.g. HTTP/3).
13131314
The `headers`, `onheaders`, `ontrailers`, `oninfo`, and `onwanttrailers`
13141315
options are only used when the session supports headers (e.g. HTTP/3).
@@ -1323,7 +1324,8 @@ added: v23.8.0
13231324
* `body` {string | ArrayBuffer | SharedArrayBuffer | ArrayBufferView |
13241325
Blob | FileHandle | AsyncIterable | Iterable | Promise | null}
13251326
The outbound body source. See [`stream.setBody()`][] for details on
1326-
supported types. When omitted, the stream is closed immediately.
1327+
supported types. When omitted, the stream's outgoing side remains
1328+
writable with no body queued; no FIN is sent immediately.
13271329
* `headers` {Object} Initial request headers to send.
13281330
* `priority` {string} The priority level of the stream. One of `'high'`,
13291331
`'default'`, or `'low'`. **Default:** `'default'`.
@@ -1345,7 +1347,8 @@ added: v23.8.0
13451347
* Returns: {Promise} for a {quic.QuicStream}
13461348

13471349
Open a new unidirectional stream. If the `body` option is not specified,
1348-
the outgoing stream will be closed. The `priority` and `incremental`
1350+
the stream's outgoing side remains writable and no FIN is sent
1351+
immediately. The `priority` and `incremental`
13491352
options are only used when the session supports priority (e.g. HTTP/3).
13501353

13511354
### `session.path`

0 commit comments

Comments
 (0)