Skip to content

quic: add promise to QuicStream for pending strms - #65862

Open
martenrichter wants to merge 7 commits into
nodejs:mainfrom
martenrichter:addreadytoquicstream
Open

quic: add promise to QuicStream for pending strms#65862
martenrichter wants to merge 7 commits into
nodejs:mainfrom
martenrichter:addreadytoquicstream

Conversation

@martenrichter

Copy link
Copy Markdown
Contributor

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.

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/quic

@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. lib / src Issues and PRs involving general changes in the lib/ or src/ directories. needs-ci PRs that need a full CI run. labels Sep 6, 2026
@martenrichter

Copy link
Copy Markdown
Contributor Author

@jasnell @pimterry that is the separate PR for a promise for pending streams

@bjohansebas bjohansebas added the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Sep 6, 2026
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Sep 6, 2026
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@codecov

codecov Bot commented Sep 6, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.18%. Comparing base (1dd48de) to head (ddfdc5d).
⚠️ Report is 6 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #65862   +/-   ##
=======================================
  Coverage   90.18%   90.18%           
=======================================
  Files         771      771           
  Lines      265451   265486   +35     
  Branches    50452    50455    +3     
=======================================
+ Hits       239398   239438   +40     
+ Misses      16985    16984    -1     
+ Partials     9068     9064    -4     
Files with missing lines Coverage Δ
lib/internal/quic/quic.js 100.00% <100.00%> (ø)
lib/internal/quic/symbols.js 100.00% <100.00%> (ø)

... and 26 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment thread doc/api/quic.md Outdated
added: v23.8.0
-->

### `stream.ready`

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Imo stream.opened would be a slightly clearer API, to match session.opened and stream.stats.opened_at.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I have changed it. (Will push soon). readycame from WebStream semantics.

Comment thread lib/internal/quic/quic.js Outdated
@trivikr trivikr added the quic Issues and PRs related to the QUIC transport implementation. label Sep 7, 2026
@jasnell
jasnell requested a review from pimterry September 8, 2026 17:49

@pimterry pimterry left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fixes @martenrichter. Code changes all look good to me.

In the docs though the name of the field is wrong, and there's now a conflict here so this'll need a rebase. Otherwise LGTM.

Comment thread doc/api/quic.md Outdated
-->

### `stream.ready`
### `stream.open`

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Docs say open, but the actual field is opened.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh yes, fixed.

@jasnell

jasnell commented Sep 8, 2026

Copy link
Copy Markdown
Member

@martenrichter ... this will need to be rebased

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 <marten.richter@freenet.de>
Comment thread src/quic/streams.cc Outdated
@martenrichter

Copy link
Copy Markdown
Contributor Author

Is rebased, but I am not sure with one change, please look at my comment.

@pimterry pimterry added the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Sep 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c++ Issues and PRs that require attention from people who are familiar with C++. lib / src Issues and PRs involving general changes in the lib/ or src/ directories. needs-ci PRs that need a full CI run. quic Issues and PRs related to the QUIC transport implementation. request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants