From a9a4f4e52214220927b21afa36910b2e1aef6b38 Mon Sep 17 00:00:00 2001 From: Eduard Fischer-Szava Date: Sat, 30 May 2026 14:09:38 +0200 Subject: [PATCH] doc: clarify QUIC stream state wording When the `body` option is omitted, no FIN is sent immediately and the writable side remains open. Describing that state as "half-closed" (or, for unidirectional streams, "closed immediately") is therefore misleading. Update both `createBidirectionalStream()` and `createUnidirectionalStream()` to describe the stream as half-open and explicitly note that no FIN is sent immediately. Fixes #63655 Signed-off-by: Eduard Fischer-Szava Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- doc/api/quic.md | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/doc/api/quic.md b/doc/api/quic.md index 5ecac022a3c83b..1d69d612414ae8 100644 --- a/doc/api/quic.md +++ b/doc/api/quic.md @@ -1253,8 +1253,8 @@ added: v23.8.0 * `body` {string | ArrayBuffer | SharedArrayBuffer | ArrayBufferView | Blob | FileHandle | AsyncIterable | Iterable | Promise | null} The outbound body source. See [`stream.setBody()`][] for details on - supported types. When omitted, the stream starts half-closed (writable - side open, no body queued). + supported types. When omitted, the stream starts half-open (writable + side open, no body queued; no FIN is sent immediately). * `headers` {Object} Initial request or response headers to send. Only used when the session supports headers (e.g. HTTP/3). If `body` is not specified and `headers` is provided, the stream is treated as @@ -1281,7 +1281,8 @@ added: v23.8.0 * Returns: {Promise} for a {quic.QuicStream} Open a new bidirectional stream. If the `body` option is not specified, -the outgoing stream will be half-closed. The `priority` and `incremental` +the outgoing stream will be half-open (writable side open, no FIN sent). +The `priority` and `incremental` options are only used when the session supports priority (e.g. HTTP/3). The `headers`, `onheaders`, `ontrailers`, `oninfo`, and `onwanttrailers` options are only used when the session supports headers (e.g. HTTP/3). @@ -1296,7 +1297,8 @@ added: v23.8.0 * `body` {string | ArrayBuffer | SharedArrayBuffer | ArrayBufferView | Blob | FileHandle | AsyncIterable | Iterable | Promise | null} The outbound body source. See [`stream.setBody()`][] for details on - supported types. When omitted, the stream is closed immediately. + supported types. When omitted, the stream starts half-open (writable + side open, no body queued; no FIN is sent immediately). * `headers` {Object} Initial request headers to send. * `priority` {string} The priority level of the stream. One of `'high'`, `'default'`, or `'low'`. **Default:** `'default'`. @@ -1318,7 +1320,8 @@ added: v23.8.0 * Returns: {Promise} for a {quic.QuicStream} Open a new unidirectional stream. If the `body` option is not specified, -the outgoing stream will be closed. The `priority` and `incremental` +the outgoing stream will be half-open (writable side open, no FIN sent). +The `priority` and `incremental` options are only used when the session supports priority (e.g. HTTP/3). ### `session.path`