gfe-relnote: Move headers streams out of static stream map. Protected by
gfe_reloadable_quic_eliminate_static_stream_map.
Following up this CL, crypto stream will be moved out of static_stream_map too.
PiperOrigin-RevId: 244429772
Change-Id: I5186bc7ab4e6ee9c9f546a3c9456be489a4ddc26
diff --git a/quic/core/quic_session.h b/quic/core/quic_session.h
index a9fb992..d620502 100644
--- a/quic/core/quic_session.h
+++ b/quic/core/quic_session.h
@@ -300,6 +300,16 @@
// reserved headers and crypto streams.
size_t GetNumOpenOutgoingStreams() const;
+ // Returns the number of open peer initiated static streams.
+ size_t num_incoming_static_streams() const {
+ return num_incoming_static_streams_;
+ }
+
+ // Returns the number of open self initiated static streams.
+ size_t num_outgoing_static_streams() const {
+ return num_outgoing_static_streams_;
+ }
+
// Add the stream to the session's write-blocked list because it is blocked by
// connection-level flow control but not by its own stream-level flow control.
// The stream will be given a chance to write when a connection-level
@@ -481,6 +491,9 @@
// Register (|id|, |stream|) with the static stream map. Override previous
// registrations with the same id.
void RegisterStaticStream(QuicStreamId id, QuicStream* stream);
+ // TODO(renjietang): Replace the original Register method with the new one
+ // once flag is deprecated.
+ void RegisterStaticStreamNew(std::unique_ptr<QuicStream> stream);
const StaticStreamMap& static_streams() const { return static_stream_map_; }
DynamicStreamMap& dynamic_streams() { return dynamic_stream_map_; }
@@ -653,6 +666,14 @@
// A counter for peer initiated streams which are in the draining_streams_.
size_t num_draining_incoming_streams_;
+ // A counter for self initiated static streams which are in
+ // dynamic_stream_map_.
+ size_t num_outgoing_static_streams_;
+
+ // A counter for peer initiated static streams which are in
+ // dynamic_stream_map_.
+ size_t num_incoming_static_streams_;
+
// A counter for peer initiated streams which are in the
// locally_closed_streams_highest_offset_.
size_t num_locally_closed_incoming_streams_highest_offset_;