gfe-relnote: In QUIC, implement GetHandshakeState() in various handshakers. Not used yet, not protected.
GetHandshakeState() will be used to retrieve current handshake state, and handshaker is the only source of this information. But caller can choose to latch handshake state for performance purpose.
PiperOrigin-RevId: 290142490
Change-Id: I51c33c9ebcbb1ab13eddc0d86197991167642461
diff --git a/quic/core/quic_crypto_stream.h b/quic/core/quic_crypto_stream.h
index 15f5a3d..7b9414c 100644
--- a/quic/core/quic_crypto_stream.h
+++ b/quic/core/quic_crypto_stream.h
@@ -85,6 +85,9 @@
// Called when a packet of encryption |level| has been successfully decrypted.
virtual void OnPacketDecrypted(EncryptionLevel level) = 0;
+ // Returns current handshake state.
+ virtual HandshakeState GetHandshakeState() const = 0;
+
// Returns the maximum number of bytes that can be buffered at a particular
// encryption level |level|.
virtual size_t BufferSizeLimitForLevel(EncryptionLevel level) const;