-
Notifications
You must be signed in to change notification settings - Fork 29.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
quic: more quic refactorings and cleanups #34283
Conversation
534f1e8
to
5b5deb3
Compare
@nodejs/quic ... there's still a lot more to do on this but this PR is already fairly large and complicated so I wanted to get this one in review. There are several major pieces in here:
const sock = createQuicSocket();
sock.on('session', (session) => {
session.on('stream', (stream) => stream.end('hi!'));
});
await sock.listen(); and const sock = createQuicSocket();
const client = await sock.connect();
const stream = await client.openStream();
stream.end('hello');
await client.close();
|
This comment has been minimized.
This comment has been minimized.
is ignored if `type` is `'udp4'`. **Default**: `false`. | ||
* `type` {string} Can be one of `'udp4'`, `'upd6'`, or `'udp6-only'` to | ||
use IPv4, IPv6, or IPv6 with dual-stack mode disabled. | ||
**Default**: `'udp4'`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we do this, should we update net
and dgram
to also accept 'udp6-only'
? It seems odd that we deviate from the type + ipv6Only
option pairing only in this place
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, eventually we should, yes. I just don't want to do it in this PR.
CIs are good |
Since the `ipv6Only` option was mutually exclusive with using `'udp6'`, making it it's own type simplifies things a bit.
Doesn't need to be a function
Restricting this to pre-bind keeps things simple
Ensure that the QuicSocket is properly destroyed if the QuicEndpoint is destroyed directly rather than through QuicSocket destroy
QUIC related, needs to be backported to v14.x 😊 |
None of the quic related prs should be backported |
thanks for letting me know @jasnell! I'm watching nodejs/github-bot#267 and in the meantime will update the issues I touched today to have the correct label 😊 |
Since the `ipv6Only` option was mutually exclusive with using `'udp6'`, making it it's own type simplifies things a bit. PR-URL: #34283 Reviewed-By: Anna Henningsen <anna@addaleax.net>
PR-URL: #34283 Reviewed-By: Anna Henningsen <anna@addaleax.net>
PR-URL: #34283 Reviewed-By: Anna Henningsen <anna@addaleax.net>
Doesn't need to be a function PR-URL: #34283 Reviewed-By: Anna Henningsen <anna@addaleax.net>
Restricting this to pre-bind keeps things simple PR-URL: #34283 Reviewed-By: Anna Henningsen <anna@addaleax.net>
PR-URL: #34283 Reviewed-By: Anna Henningsen <anna@addaleax.net>
Ensure that the QuicSocket is properly destroyed if the QuicEndpoint is destroyed directly rather than through QuicSocket destroy PR-URL: #34283 Reviewed-By: Anna Henningsen <anna@addaleax.net>
PR-URL: #34283 Reviewed-By: Anna Henningsen <anna@addaleax.net>
This is the start of a conversion over to a fully Promise-centric API for the QUIC implementation. PR-URL: #34283 Reviewed-By: Anna Henningsen <anna@addaleax.net>
PR-URL: #34283 Reviewed-By: Anna Henningsen <anna@addaleax.net>
PR-URL: #34283 Reviewed-By: Anna Henningsen <anna@addaleax.net>
QuicClientSession and QuicServerSessions are now always immediately ready for use when they are created, so no more need to track ready state. PR-URL: #34283 Reviewed-By: Anna Henningsen <anna@addaleax.net>
PR-URL: #34283 Reviewed-By: Anna Henningsen <anna@addaleax.net>
PR-URL: #34283 Reviewed-By: Anna Henningsen <anna@addaleax.net>
PR-URL: #34283 Reviewed-By: Anna Henningsen <anna@addaleax.net>
PR-URL: #34283 Reviewed-By: Anna Henningsen <anna@addaleax.net>
When entering the closing or draining periods, servers should wait three times the current probe timeout before releasing session state. PR-URL: #34283 Reviewed-By: Anna Henningsen <anna@addaleax.net>
PR-URL: #34283 Reviewed-By: Anna Henningsen <anna@addaleax.net>
Builds on #34262 ... that one needs to land first (the first three commits are from that PR)
quic: replace ipv6Only option with
'udp6-only'
typeSince the
ipv6Only
option was mutually exclusive withusing
'udp6'
, making it it's own type simplifies thingsa bit.
(more will be added)
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes