Skip to content

Commit a22a840

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 9a65b7f commit a22a840

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
@@ -1278,8 +1278,8 @@ added: v23.8.0
12781278
* `body` {string | ArrayBuffer | SharedArrayBuffer | ArrayBufferView |
12791279
Blob | FileHandle | AsyncIterable | Iterable | Promise | null}
12801280
The outbound body source. See [`stream.setBody()`][] for details on
1281-
supported types. When omitted, the stream starts half-closed (writable
1282-
side open, no body queued).
1281+
supported types. When omitted, the stream's outgoing side remains
1282+
writable with no body queued; no FIN is sent immediately.
12831283
* `headers` {Object} Initial request or response headers to send. Only
12841284
used when the session supports headers (e.g. HTTP/3). If `body` is not
12851285
specified and `headers` is provided, the stream is treated as
@@ -1306,7 +1306,8 @@ added: v23.8.0
13061306
* Returns: {Promise} for a {quic.QuicStream}
13071307

13081308
Open a new bidirectional stream. If the `body` option is not specified,
1309-
the outgoing stream will be half-closed. The `priority` and `incremental`
1309+
the stream's outgoing side remains writable and no FIN is sent
1310+
immediately. The `priority` and `incremental`
13101311
options are only used when the session supports priority (e.g. HTTP/3).
13111312
The `headers`, `onheaders`, `ontrailers`, `oninfo`, and `onwanttrailers`
13121313
options are only used when the session supports headers (e.g. HTTP/3).
@@ -1321,7 +1322,8 @@ added: v23.8.0
13211322
* `body` {string | ArrayBuffer | SharedArrayBuffer | ArrayBufferView |
13221323
Blob | FileHandle | AsyncIterable | Iterable | Promise | null}
13231324
The outbound body source. See [`stream.setBody()`][] for details on
1324-
supported types. When omitted, the stream is closed immediately.
1325+
supported types. When omitted, the stream's outgoing side remains
1326+
writable with no body queued; no FIN is sent immediately.
13251327
* `headers` {Object} Initial request headers to send.
13261328
* `priority` {string} The priority level of the stream. One of `'high'`,
13271329
`'default'`, or `'low'`. **Default:** `'default'`.
@@ -1343,7 +1345,8 @@ added: v23.8.0
13431345
* Returns: {Promise} for a {quic.QuicStream}
13441346

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

13491352
### `session.path`

0 commit comments

Comments
 (0)