VersionInformation class

RFC 9368 version_information transport parameter.

Wire format (from RFC 9368 Section 3):

version_information {
  chosen_version (32 bits),
  available_versions (32 bits each),
  other_versions (32 bits each)
}

Constructors

VersionInformation({required int chosenVersion, required List<int> availableVersions, List<int> otherVersions = const []})
Creates version information for the transport parameter.

Properties

availableVersions List<int>
Versions the endpoint is willing and able to negotiate.
final
chosenVersion int
The QUIC version selected for this connection.
final
hashCode int
The hash code for this object.
no setterinherited
otherVersions List<int>
Additional versions included for greasing or future negotiation.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

isVersionCompatible(int version) bool
Check if a version is compatible with the peer's available versions.
isZeroRttCompatible(VersionInformation serverInfo) bool
Check if 0-RTT is compatible (client's chosen version must be in server's available versions).
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
serialize() Uint8List
Serialize to bytes. Format: chosen_version (4 bytes) + available_versions (4 bytes each) + other_versions (4 bytes each)
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

parse(Uint8List bytes) VersionInformation
Parse from bytes.