IETF CONNECTION CLOSE code is varint encoded
In the recent (-22) version of the IETF QUIC Internet Draft, the
encoding of the close code in the Connection Close frames was changed
from uint16_t to varint62.
NOTE WELL, this just changes the serialization of the code. The error
code is stored as a uint16_t. A separate CL will change the base type
for the Transport Error Code and Application Error Code.
gfe-relnote: N/A is IETF QUIC/v99 code only.
PiperOrigin-RevId: 258377932
Change-Id: I0be6068b1a2194d4c45d464b393698389a73cb75
diff --git a/quic/core/frames/quic_connection_close_frame.h b/quic/core/frames/quic_connection_close_frame.h
index 8025fbe..aba67b9 100644
--- a/quic/core/frames/quic_connection_close_frame.h
+++ b/quic/core/frames/quic_connection_close_frame.h
@@ -51,13 +51,15 @@
QuicConnectionCloseType close_type;
// This is the error field in the frame.
- // The CONNECTION_CLOSE frame reports a 16-bit error code:
+ // The CONNECTION_CLOSE frame reports an error code:
// - The transport error code as reported in a CONNECTION_CLOSE/Transport
- // frame,
- // - An opaque 16-bit code as reported in CONNECTION_CLOSE/Application frames,
- // - A QuicErrorCode, which is used in Google QUIC.
+ // frame (serialized as a VarInt),
+ // - An opaque 64-bit code as reported in CONNECTION_CLOSE/Application frames
+ // (serialized as a VarInt),,
+ // - A 16 bit QuicErrorCode, which is used in Google QUIC.
union {
QuicIetfTransportErrorCodes transport_error_code;
+ // TODO(fkastenholz): Change this to uint64_t to reflect -22 of the ID.
uint16_t application_error_code;
QuicErrorCode quic_error_code;
};