StatelessResetPacket class
A STATELESS_RESET packet that can be sent by a server that has lost connection state. It looks like a regular packet but is identified by the presence of a valid stateless reset token.
Constructors
- StatelessResetPacket({required StatelessResetToken token, required Uint8List randomBytes})
- StatelessResetPacket.create(StatelessResetToken token)
-
Creates a stateless reset packet with random padding
factory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- randomBytes → Uint8List
-
Random bytes to pad the packet to a minimum size
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- token → StatelessResetToken
-
The stateless reset token (last 16 bytes of the packet)
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toBytes(
) → Uint8List - Converts the stateless reset packet to bytes
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
tryParse(
Uint8List bytes) → StatelessResetPacket? - Attempts to parse a stateless reset packet from bytes. Returns null if the packet is too small or doesn't have a token at the end.
Constants
- minPacketSize → const int
- Minimum packet size for stateless reset (to avoid amplification)