WebTransportCapsule class

A WebTransport capsule consisting of a type, length, and payload.

This class is distinct from the HTTP/3 Capsule class in lib/src/http3/capsule_protocol.dart. The two classes previously shared a name and were both exported from quic_lib.dart, causing a public API ambiguity. The WebTransport class is now named WebTransportCapsule.

Constructors

WebTransportCapsule({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

Static Methods

parse(Uint8List bytes, {int offset = 0}) → (WebTransportCapsule, int)
Parse from bytes.