VersionNegotiationPacket class
A VERSION_NEGOTIATION packet sent by the server when client requests an unsupported version.
Constructors
-
VersionNegotiationPacket({required ConnectionId destinationCid, required ConnectionId sourceCid, required List<
int> supportedVersions}) - VersionNegotiationPacket.fromBytes(Uint8List bytes)
-
Creates a VERSION_NEGOTIATION packet from raw bytes
factory
Properties
- destinationCid → ConnectionId
-
The destination Connection ID (from the client's initial packet)
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sourceCid → ConnectionId
-
The source Connection ID (from the client's initial packet)
final
-
supportedVersions
→ List<
int> -
List of supported versions offered by the server
final
Methods
-
isValid(
) → bool - Checks if this VERSION_NEGOTIATION packet is valid
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toBytes(
) → Uint8List - Converts the VERSION_NEGOTIATION packet to raw bytes
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited