Chromium Code Reviews
DescriptionGroundwork for cancelling quartc streams after a deadline is exceeded.
In the quic/quartc wrapper:
- Adds a method to QuartcSessionInterface to cancel a stream by number
- Fixes stream error code reporting
- Fixes spurious reset frames sent with QUIC_RST_STREAM_ACKNOWLEDGEMENT
This is done by number on QuartcSessionInterface instead of by a method on a
stream (or by passing the session a pointer to the stream) because the quartc
session owns quartc streams and may delete them before the deadline. Under the
covers, the CancelStream method resets a stream with error code 6
(QUIC_STREAM_CANCELLED).
QuartcStream currently only reports a non-zero error code if there's a
connection error. This cl rectifies that by exposing both stream_error() and
connection_error() and letting callers examine whichever one they want.
Since Quartc only sends on outgoing streams, it never sent a fin on incoming
streams. This led to it not closing incoming streams cleanly. Whenever it
closed an incoming stream, it sent a reset frame with the error code
QUIC_RST_STREAM_ACKNOWLEDGEMENT, in order to communicate a final byte offset.
This isn't necessary, since we never send anything (the final offset is always
0). Instead, we now close the reverse direction (sending on inbound streams,
receiving on outbound streams) immediately on stream creation, by simulating
a fin. This prevents spurious reset frames that look like errors.
In quartc:
- Adds CancelStream to the thread-safe wrapper
- Adds an optional parameter to SendOutgoingFrame to set a deadline
- Fixes incorrectly ordered boolean parameters in the quartc_connection_test
SendOutgoingFrame will now schedule a task to cancel a stream if it is given a
non-infinite deadline. The new deadline parameter defaults to infinite to
preserve current behavior. We'll likely only use this for video and audio
streams, not for data and control streams.
n/a (only linked by quartc)
Merge internal change: 157132817
R=rch@chromium.org
BUG=
Patch Set 1 #
Depends on Patchset: Dependent Patchsets: Messages
Total messages: 2 (0 generated)
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||