Make some parameters 64bit in QuicConfig
QuicConfig was originally built for QUIC_CRYPTO which exchanges most of its parameters as 32bit values. IETF QUIC however exchanges 62bit integers over the wire.
For example, our flow control code deals in QuicStreamOffset which is uint64_t and the IETF QUIC transport parameters can encode values up to 2^62-1, but they transit through QuicConfig which can only store 32 bits.
This CL allows the config to handle 64bit values, without changing the wire encoding. This CL still encodes these values as uint32 when using QUIC_CRYPTO.
gfe-relnote: refactor QuicConfig, no behavior change, not flag protected
PiperOrigin-RevId: 309275731
Change-Id: I9d8831af66b34dcaf8599e75c49daa1d8de3fcc4
diff --git a/quic/core/quic_stream.h b/quic/core/quic_stream.h
index cc7ce4d..fe9d04c 100644
--- a/quic/core/quic_stream.h
+++ b/quic/core/quic_stream.h
@@ -76,7 +76,7 @@
const QuicStreamSequencer* sequencer() const { return &sequencer_; }
- void MarkConsumed(size_t num_bytes);
+ void MarkConsumed(QuicByteCount num_bytes);
// Tells the sequencer to ignore all incoming data itself and not call
// OnDataAvailable().
@@ -201,7 +201,7 @@
bool IsWaitingForAcks() const;
// Number of bytes available to read.
- size_t ReadableBytes() const;
+ QuicByteCount ReadableBytes() const;
QuicRstStreamErrorCode stream_error() const { return stream_error_; }
QuicErrorCode connection_error() const { return connection_error_; }
@@ -392,7 +392,7 @@
virtual void OnCanWriteNewData() {}
// Called when |bytes_consumed| bytes has been consumed.
- virtual void OnStreamDataConsumed(size_t bytes_consumed);
+ virtual void OnStreamDataConsumed(QuicByteCount bytes_consumed);
// Called by the stream sequencer as bytes are consumed from the buffer.
// If the receive window has dropped below the threshold, then send a