| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
Review requested:
|
Sorry, something went wrong.
Signed-off-by: James M Snell <jasnell@gmail.com>
Sorry, something went wrong.
|
@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. |
Sorry, something went wrong.
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## main #63536 +/- ##
==========================================
+ Coverage 90.32% 90.37% +0.05%
==========================================
Files 730 730
Lines 234152 234521 +369
Branches 43900 44141 +241
==========================================
+ Hits 211499 211954 +455
+ Misses 14374 14328 -46
+ Partials 8279 8239 -40
... and 39 files with indirect coverage changes 🚀 New features to boost your workflow:
|
Sorry, something went wrong.
|
Please look at the discussion at: |
Sorry, something went wrong.
There was a problem hiding this comment.
lgtm
Sorry, something went wrong.
|
Overall yes, we should add an Agent system to make the reuse constrained and limited if someone needs that. |
Sorry, something went wrong.
|
If we're going to add an agent, then I think this PR needs to take a different approach. Moving to draft for now. |
Sorry, something went wrong.
|
Actually.. thinking about it more... a QuicAgent type of thing doesn't actually make sense :-) ... the QuicEndpoint already acts like an agent... user code can figure out whatever approach it wants to re-using them. Specifically: When connect(...) is called, it will create a QuicEndpoint automatically if one does not exist. Or, you can call new QuicEndpoint(...) to create one and pass it in with the connect(...) to use it. Or, you can use the endpoint directly to connect. The point being, it ends up largely serving the same role as the Agent in http 1 and 2. |
Sorry, something went wrong.
Sorry, something went wrong.
|
+1 on the Agent mechanism |
Sorry, something went wrong.
Signed-off-by: James M Snell <jasnell@gmail.com> PR-URL: #63536 Reviewed-By: Stephen Belanger <admin@stephenbelanger.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Signed-off-by: James M Snell <jasnell@gmail.com> PR-URL: #63536 Reviewed-By: Stephen Belanger <admin@stephenbelanger.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Signed-off-by: James M Snell <jasnell@gmail.com> PR-URL: nodejs#63536 Reviewed-By: Stephen Belanger <admin@stephenbelanger.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Signed-off-by: James M Snell <jasnell@gmail.com> PR-URL: nodejs#63536 Reviewed-By: Stephen Belanger <admin@stephenbelanger.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
| Back | FazBrowse Home | New Git URL |
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