QuicBitGreaser class
Implements RFC 9287 greasing of the QUIC bit.
Constructors
- QuicBitGreaser()
- Creates a QUIC bit greaser (all methods are static).
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
greasePacket(
Uint8List packet) → Uint8List - Sets the QUIC bit (bit 6 of the first byte, 0-indexed from MSB). The QUIC bit is the second-most-significant bit.
-
isQuicBitSet(
Uint8List packet) → bool - Checks if the QUIC bit is set.
-
randomizeQuicBit(
Uint8List packet) → Uint8List - Randomly sets or clears the QUIC bit.
-
shouldGrease(
) → bool - Returns true approximately 50% of the time.
-
ungreasePacket(
Uint8List packet) → Uint8List - Clears the QUIC bit.