Capsule class
A WebTransport capsule consisting of a type, length, and payload.
NOTE: This class is distinct from the HTTP/3 Capsule class in
lib/src/http3/capsule_protocol.dart. The two classes share a name and
are both exported from quic_lib.dart, causing a public API ambiguity.
This class will be renamed to WebTransportCapsule in v2.0.0.
Constructors
-
Capsule({required CapsuleType type, required List<
int> payload})
Properties
- hashCode → int
-
The hash code for this object.
no setteroverride
-
payload
→ List<
int> -
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- type → CapsuleType
-
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
serialize(
) → Uint8List - Serialize: VarInt(type) + VarInt(length) + payload
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override