Add QpackStreams into QuicSpdySession.
Currently our QuicStreamIdManager is still in a gQUIC style, which doesn't support creating static streams later in a session. Thus in this CL, all QPACK send streams are created right at QuicSpdySession initialization.
For the same reason, QPACK stream types are sent on the wire once handshake is confirmed. In the future we can delay it until we send data on those streams.
gfe-relnote: v99 only, not used in prod.
PiperOrigin-RevId: 263776677
Change-Id: If710bde79ea2698f68710d7ac36ca6b039556260
diff --git a/quic/core/qpack/qpack_send_stream.cc b/quic/core/qpack/qpack_send_stream.cc
index 34bba65..fe25f26 100644
--- a/quic/core/qpack/qpack_send_stream.cc
+++ b/quic/core/qpack/qpack_send_stream.cc
@@ -36,4 +36,13 @@
WriteOrBufferData(data, false, nullptr);
}
+void QpackSendStream::SendStreamType() {
+ char type[sizeof(http3_stream_type_)];
+ QuicDataWriter writer(QUIC_ARRAYSIZE(type), type);
+ writer.WriteVarInt62(http3_stream_type_);
+ WriteOrBufferData(QuicStringPiece(writer.data(), writer.length()), false,
+ nullptr);
+ stream_type_sent_ = true;
+}
+
} // namespace quic