Change STOP_SENDING frame related APIs to use QuicRstStreamError type.
Change QuicControlFrameManager::WriteOrBufferStopSending(),
QuicSession::SendStopSending(), QuicStream::OnStopSending(), and
QuicStopSendingFrame constructor to take QuicRstStreamError arguments.
Add QuicStopSendingFrame::error_code member. Remove
QuicStopSendingFrame::application_error_code and QuicApplicationErrorCode.
Previously the error code was stored in an uint16_t, now in a
QuicRstStreamError, which has a wider underlying type of int. However, the
truncation logic for incoming STOP_SENDING frames in
QuicFramer::ProcessStopSendingFrame() is unchanged.
PiperOrigin-RevId: 329762228
Change-Id: Iab016a992e9bdde945ed96c7ba03b86276c1e968
diff --git a/quic/core/quic_control_frame_manager.h b/quic/core/quic_control_frame_manager.h
index 7615754..d57d120 100644
--- a/quic/core/quic_control_frame_manager.h
+++ b/quic/core/quic_control_frame_manager.h
@@ -77,7 +77,8 @@
// Tries to send an IETF-QUIC STOP_SENDING frame. The frame is buffered if it
// can not be sent immediately.
- void WriteOrBufferStopSending(uint16_t code, QuicStreamId stream_id);
+ void WriteOrBufferStopSending(QuicRstStreamErrorCode code,
+ QuicStreamId stream_id);
// Tries to send an HANDSHAKE_DONE frame. The frame is buffered if it can not
// be sent immediately.