WebTransportSession class

Represents an active WebTransport session over HTTP/3.

This class wraps the canonical wt.WebTransportSession from the webtransport subsystem, adding HTTP/3 connection-aware operations (sending capsules, datagrams, and streams on the underlying Http3Connection).

Constructors

WebTransportSession(Http3Connection connection, int sessionId)
Creates a WebTransport session on connection identified by sessionId.

Properties

connection → Http3Connection
The HTTP/3 connection carrying this session.
final
datagrams → Stream<Uint8List>
Stream of unreliable datagrams received from the peer.
no setter
hashCode → int
The hash code for this object.
no setterinherited
incomingStreams → Stream<Uint8List>
Stream of incoming bidirectional streams opened by the peer.
no setter
isActive → bool
Whether the session is still active (not draining and not closed).
no setter
isClosed → bool
Whether this session has been closed locally or by the peer.
no setter
isDraining → bool
Whether the peer has initiated a drain.
no setter
receivedDatagrams → List<Uint8List>
Datagrams received via CapsuleType.datagram capsules.
no setter
receivedGoaway → bool
Whether a GOAWAY capsule has been received from the peer.
no setter
registeredBidirectionalStreams → List<int>
Bidirectional stream IDs registered by the peer.
no setter
registeredUnidirectionalStreams → List<int>
Unidirectional stream IDs registered by the peer.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
sessionId → int
The session identifier, which equals the underlying QUIC stream ID.
final

Methods

close({int errorCode = 0}) → void
Close the session with an error code.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onCapsule(Capsule capsule) → void
Handle incoming capsule from this session.
sendDatagram(Uint8List data) → void
Send an unreliable datagram using RFC 9221 DATAGRAM frames.
sendStream(Uint8List data) → void
Send a WebTransport stream (maps to a new QUIC bidirectional stream).
toString() → String
A string representation of this object.
inherited

Operators

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