Add ShouldUpdateExpectedConnectionIdLength to QuicFramer
ShouldUpdateExpectedConnectionIdLength allows clients of QuicDispatcher like Quartc to have the QuicFramer owned by the QuicDispatcher dynamically change its expected connection ID length based on received long header packets. This will allow quartc to migrate to 0-length connection IDs.
gfe-relnote: refactor-only, no behavior change, not flag protected
PiperOrigin-RevId: 237882443
Change-Id: If7a49b092e1ff29fec740a18bbb7c5b78d749d62
diff --git a/quic/core/quic_dispatcher.h b/quic/core/quic_dispatcher.h
index 77d4952..aadd06b 100644
--- a/quic/core/quic_dispatcher.h
+++ b/quic/core/quic_dispatcher.h
@@ -349,6 +349,14 @@
// Skip validating that the public flags are set to legal values.
void DisableFlagValidation();
+ // If true, our framer will change its expected connection ID length
+ // to the received destination connection ID length of all IETF long headers.
+ void SetShouldUpdateExpectedConnectionIdLength(
+ bool should_update_expected_connection_id_length) {
+ framer_.SetShouldUpdateExpectedConnectionIdLength(
+ should_update_expected_connection_id_length);
+ }
+
private:
friend class test::QuicDispatcherPeer;
friend class StatelessRejectorProcessDoneCallback;