ShortHeader class

QUIC short header used for 1-RTT application data.

The short header omits the version and source connection ID, keeping only the destination connection ID and a truncated packet number. It also carries the spin bit (latency measurement) and key-phase bit (key update).

See also:

  • LongHeader — used during the handshake
  • PacketBuilder — assembles packets with short headers
  • RFC 9000 Section 17.3
Implemented types

Constructors

ShortHeader({required List<int> destinationConnectionId, int packetNumber = 0, bool spinBit = false, bool keyPhase = false, int packetNumberLength = 1, List<int> payload = const [], bool greaseQuicBit = false})
Creates a short header.

Properties

byteLength int
Total serialized byte length.
no setteroverride
destinationConnectionId List<int>
The destination connection ID.
final
greaseQuicBit bool
Whether to randomly set or clear the QUIC bit (RFC 9287).
final
hashCode int
The hash code for this object.
no setterinherited
headerForm int
The header form: 1 for long header, 0 for short header.
no setteroverride
keyPhase bool
The key phase bit indicating which packet-protection keys are in use.
final
packetNumber int
The packet number (truncated to packetNumberLength bytes on wire).
final
packetNumberLength int
The byte length of the truncated packet number on the wire (1..4).
final
payload List<int>
The payload bytes (frames) carried after the header.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
spinBit bool
The spin bit used for latency measurement (RFC 9000 Section 17.3.1).
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
serialize() Future<Uint8List>
Serialize this header to bytes.
override
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited