From 897d79649541fea22e77abb6b6fb053a6061f321 Mon Sep 17 00:00:00 2001 From: EduardF1 <50618110+EduardF1@users.noreply.github.com> Date: Fri, 26 Jun 2026 12:33:27 +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, so the stream can still be written later via `stream.setBody()` or the writer. Per reviewer feedback, describe this state as "half-closed" rather than "half-open": in networking "half-open" implies a failure case (one peer crashed or vanished), whereas "half-closed" reflects the intentional one-direction-open semantics here. Update both `createBidirectionalStream()` and `createUnidirectionalStream()` accordingly and explicitly note that no FIN is sent immediately. Fixes: https://github.com/nodejs/node/issues/63655 Signed-off-by: Eduard Fischer-Szava --- doc/api/quic.md | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/doc/api/quic.md b/doc/api/quic.md index d36825d6943264..144c33f008d091 100644 --- a/doc/api/quic.md +++ b/doc/api/quic.md @@ -1281,7 +1281,7 @@ added: v23.8.0 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). + 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 @@ -1308,7 +1308,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-closed (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). @@ -1323,7 +1324,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-closed (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'`. @@ -1345,7 +1347,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-closed (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`