quic: extract transport logic from Application to Session#64127
quic: extract transport logic from Application to Session#64127pimterry wants to merge 5 commits into
Conversation
|
Review requested:
|
19197f6 to
5fdb7e8
Compare
| stream_id id = -1; | ||
| int fin = 0; | ||
| ngtcp2_vec data[kMaxVectorCount]{}; | ||
| BaseObjectPtr<Stream> stream; |
There was a problem hiding this comment.
I wonder if we can drop id and just rely on stream.
There was a problem hiding this comment.
I agree it'd be nice, but I don't think we can unfortunately - looks like there's a few cases where we have an id but no stream (just for HTTP/3 - because we don't build a Stream instance for the control & qpack streams) and we also separately use id -1 when there's nothing to send in SendPendingData, so there's two separate cases where stream==null and right now we use the id to differentiate.
There's probably a route through there, but it's a bit more complicated than it seems, I'd leave it for now imo.
One small fix notably included: - Check is_destroyed() after StreamCommit, since it calls JS callbacks which could destroy the session. Signed-off-by: Tim Perry <pimterry@gmail.com>
Cleanup max_packet_size handling
Handle mechnical cleanup review comments
Fix preexisting bug in TryWritePendingDatagram
5fdb7e8 to
157417a
Compare
Convert fin to bool
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #64127 +/- ##
==========================================
- Coverage 92.04% 90.25% -1.80%
==========================================
Files 381 741 +360
Lines 169461 240976 +71515
Branches 25975 45393 +19418
==========================================
+ Hits 155983 217488 +61505
- Misses 13188 15069 +1881
- Partials 290 8419 +8129 🚀 New features to boost your workflow:
|
Extracting out some standalone refactoring from #63995 for easier review while we keep debating the API. I think this is a helpful refactoring generally, but especially in a world where we're restructuring
Application.This shrinks the application layer by moving generic QUIC logic that will be used by all implementations into the Session itself, and makes the Session act as a clean interface over ngtcp2 - so that the Application exclusively uses Session methods for all connection manipulation, instead of managing ngtcp2 directly. This gives a cleaner split between the low-level QUIC behaviour and the per-application-protocol layer.
There's two small fixes notably included in the migration, contained within the moved code: