Skip to content

quic: add listEndpoints API#63536

Open
jasnell wants to merge 1 commit into
nodejs:mainfrom
jasnell:jasnell/quic-agent
Open

quic: add listEndpoints API#63536
jasnell wants to merge 1 commit into
nodejs:mainfrom
jasnell:jasnell/quic-agent

Conversation

@jasnell
Copy link
Copy Markdown
Member

@jasnell jasnell commented May 24, 2026

Adds the listEndpoints API. Since we're maintaining a registry of endpoints to be re-used with connect, this helps enumerate which endpoints are currently available.

Also apply a few other minor cleanups

@nodejs/quic

@nodejs-github-bot
Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/quic

@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. quic Issues and PRs related to the QUIC implementation / HTTP/3. labels May 24, 2026
Signed-off-by: James M Snell <jasnell@gmail.com>
@jasnell jasnell force-pushed the jasnell/quic-agent branch from 4a97717 to b6bde18 Compare May 24, 2026 14:37
@jasnell jasnell added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label May 24, 2026
@nodejs-github-bot
Copy link
Copy Markdown
Collaborator

@jasnell
Copy link
Copy Markdown
Member Author

jasnell commented May 24, 2026

@nodejs/quic @mcollina ... there is an API design question in this... right now, the module maintains a global set of QuicEndpoint instances for re-use. When calling connect(), it will, by default, use an existing QuicEndpoint if one is available. The selection is pretty unsophisticated (use the first active one in the list). Should we introduce a pluggable QuicAgent mechanism that allows users to customize the selection process? The default QuicAgent would use the current behavior, but the user could potentially have something like const agent = new MyQuicAgent(); const session = connect(..., { agent }) to provide their own re-use strategy. I went with the simple global agent for now.

The module-level listEndpoints API makes sense for that, but if we end up wanting a QuicAgent type of mechanism then we should do that now.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 24, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.33%. Comparing base (df09b2a) to head (b6bde18).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #63536   +/-   ##
=======================================
  Coverage   90.32%   90.33%           
=======================================
  Files         730      730           
  Lines      234152   234172   +20     
  Branches    43900    43911   +11     
=======================================
+ Hits       211499   211538   +39     
+ Misses      14374    14367    -7     
+ Partials     8279     8267   -12     
Files with missing lines Coverage Δ
lib/internal/quic/quic.js 100.00% <100.00%> (ø)

... and 30 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author ready PRs that have at least one approval, no pending requests for changes, and a CI started. needs-ci PRs that need a full CI run. quic Issues and PRs related to the QUIC implementation / HTTP/3.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants