From 5fd0f6087be823e5595b8ca067dee9cd28c31c69 Mon Sep 17 00:00:00 2001 From: Marten Richter Date: Sun, 6 Sep 2026 19:19:35 +0200 Subject: [PATCH 1/6] quic: add promise to QuicStream for pending strms before this PR, it was necessary to poll, if a stream can not be created immediately due to flow control. This PR adds a promise to QuicStream, that fulfills, when a stream is available and ready. Signed-off-by: Marten Richter --- doc/api/quic.md | 13 ++++++++ lib/internal/quic/quic.js | 33 +++++++++++++++++++ lib/internal/quic/symbols.js | 2 ++ src/quic/bindingdata.h | 1 + src/quic/streams.cc | 13 +++++++- src/quic/streams.h | 4 +++ .../test-quic-internal-setcallbacks.mjs | 1 + .../test-quic-stream-limits-pending.mjs | 12 +++++++ test/parallel/test-quic-stream-limits-uni.mjs | 13 ++++++++ typings/internalBinding/quic.d.ts | 1 + 10 files changed, 92 insertions(+), 1 deletion(-) diff --git a/doc/api/quic.md b/doc/api/quic.md index 9cbff24bc086..12fc7339625d 100644 --- a/doc/api/quic.md +++ b/doc/api/quic.md @@ -1921,6 +1921,19 @@ Either `'application'` or `'transport'`. Indicates the namespace of added: v23.8.0 --> +### `stream.ready` + + + +* Type: {Promise} + +A promise that is immediately fulfilled, if the stream fits within +flow control limits or fulfilled when the pending stream is created. +It rejects, if a pending stream is closed with an error before being +created. + ### `stream.closed` -### `stream.ready` +### `stream.open` -### `stream.open` +### `stream.opened`