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_stream.h b/quic/core/quic_stream.h
index f808d50..a5520bd 100644
--- a/quic/core/quic_stream.h
+++ b/quic/core/quic_stream.h
@@ -344,7 +344,7 @@
// Handle received StopSending frame. Returns true if the processing finishes
// gracefully.
- virtual bool OnStopSending(uint16_t code);
+ virtual bool OnStopSending(QuicRstStreamErrorCode code);
// Returns true if the stream is static.
bool is_static() const { return is_static_; }