WebTransport extension type

The WebTransport interface of the WebTransport API provides functionality to enable a user agent to connect to an HTTP/3 server, initiate reliable and unreliable transport in either or both directions, and close the connection once it is no longer needed.


API documentation sourced from MDN Web Docs.

on
Implemented types
Available extensions

Constructors

WebTransport(String url, [WebTransportOptions options])
factory

Properties

closed JSPromise<WebTransportCloseInfo>
The closed read-only property of the WebTransport interface returns a promise that resolves when the transport is closed.
no setter
datagrams WebTransportDatagramDuplexStream
The datagrams read-only property of the WebTransport interface returns a WebTransportDatagramDuplexStream instance that can be used to send and receive datagrams — unreliable data transmission.
no setter
hashCode int
The hash code for this object.
no setterinherited
incomingBidirectionalStreams ReadableStream
The incomingBidirectionalStreams read-only property of the WebTransport interface represents one or more bidirectional streams opened by the server. Returns a ReadableStream of WebTransportBidirectionalStream objects. Each one can be used to reliably read data from the server and write data back to it.
no setter
incomingUnidirectionalStreams ReadableStream
The incomingUnidirectionalStreams read-only property of the WebTransport interface represents one or more unidirectional streams opened by the server. Returns a ReadableStream of WebTransportReceiveStream objects. Each one can be used to reliably read data from the server.
no setter
ready JSPromise<JSAny?>
The ready read-only property of the WebTransport interface returns a promise that resolves when the transport is ready to use.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

close([WebTransportCloseInfo closeInfo]) → void
The close() method of the WebTransport interface closes an ongoing WebTransport session.
createBidirectionalStream([WebTransportSendStreamOptions options]) JSPromise<WebTransportBidirectionalStream>
The createBidirectionalStream() method of the WebTransport interface asynchronously opens and returns a bidirectional stream.
createUnidirectionalStream([WebTransportSendStreamOptions options]) JSPromise<JSObject>
The createUnidirectionalStream() method of the WebTransport interface asynchronously opens a unidirectional stream.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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