DatagramCapsule class

A WebTransport datagram capsule (RFC 9220 Section 5.1).

Datagram capsules have type 0x00 and carry an opaque payload.

Constructors

DatagramCapsule(Uint8List payload)
Creates a datagram capsule carrying payload.

Properties

hashCode int
The hash code for this object.
no setterinherited
payload Uint8List
Opaque datagram payload.
final
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
serialize() Uint8List
Serialize to bytes: VarInt(type) + payload.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

parse(Uint8List bytes) DatagramCapsule
Parse from bytes, skipping the leading type varint.