NativeSession class final

An established session on top of a wt_connection_t.

Implemented types

Constructors

NativeSession(Pointer<wt_connection_t> _connection, {WebTransportCongestionControl congestionControl = WebTransportCongestionControl.defaultPolicy})

Properties

closed → Future<void>
Completes once the session is closed from either side.
no setteroverride
congestionControl → WebTransportCongestionControl
The congestion control policy in use.
final
connection → Pointer<wt_connection_t>
The underlying native connection (native only).
no setter
datagrams → WebTransportDatagramDuplexStream
Unreliable, unordered messages.
no setteroverride
hashCode → int
The hash code for this object.
no setterinherited
incomingBidirectionalStreams → Stream<WebTransportBidirectionalStream>
Streams opened by the peer.
no setteroverride
incomingUnidirectionalStreams → Stream<WebTransportReceiveStream>
Streams opened by the peer.
no setteroverride
isClosed → bool
True once the session is gone.
no setter
ready → Future<void>
Completes once the session is established, or fails with a WebTransportError (or a WebTransportException on the native backend).
no setteroverride
reliability → WebTransportReliabilityMode
Whether the session supports unreliable transport.
no setteroverride
remoteAddress → String
Peer IP address.
no setter
remotePort → int
Peer UDP port.
no setter
rtt → Duration
Smoothed round-trip time.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
sessionId → int
The WebTransport session id.
no setter
stableId → int
Stable identifier for this connection.
no setter

Methods

close([WebTransportCloseInfo? closeInfo]) → Future<void>
Closes the session.
override
completeClosed() → void
Marks the session as closed.
createBidirectionalStream([WebTransportSendStreamOptions? options]) → Future<WebTransportBidirectionalStream>
Opens a reliable, ordered bidirectional stream.
override
createUnidirectionalStream([WebTransportSendStreamOptions? options]) → Future<WebTransportSendStream>
Opens a reliable, ordered unidirectional stream.
override
dispose() → void
Releases the native handle and every stream still owned by this session.
getStats() → Future<WebTransportStats>
Session statistics.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited
watchClosed() → void
Watches the native connection and completes closed when it goes away.

Operators

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