Interface WebTransport
interface WebTransport {
closed: Promise<WebTransportCloseInfo>;
datagrams: WebTransportDatagramDuplexStream;
incomingBidirectionalStreams: ReadableStream;
incomingUnidirectionalStreams: ReadableStream;
ready: Promise<undefined>;
close(closeInfo?: WebTransportCloseInfo): void;
createBidirectionalStream(
options?: WebTransportSendStreamOptions,
): Promise<WebTransportBidirectionalStream>;
createUnidirectionalStream(
options?: WebTransportSendStreamOptions,
): Promise<WritableStream>;
}
closed: Promise<WebTransportCloseInfo>;
datagrams: WebTransportDatagramDuplexStream;
incomingBidirectionalStreams: ReadableStream;
incomingUnidirectionalStreams: ReadableStream;
ready: Promise<undefined>;
close(closeInfo?: WebTransportCloseInfo): void;
createBidirectionalStream(
options?: WebTransportSendStreamOptions,
): Promise<WebTransportBidirectionalStream>;
createUnidirectionalStream(
options?: WebTransportSendStreamOptions,
): Promise<WritableStream>;
}
Properties
Readonly
closed
Readonly
datagrams
Readonly
incomingBidirectionalStreams
Readonly
incomingUnidirectionalStreams
Readonly
ready
Methods
close
- close(closeInfo?: WebTransportCloseInfo): void
Parameters
Optional
closeInfo: WebTransportCloseInfo
Returns void
createBidirectionalStream
- createBidirectionalStream(
options?: WebTransportSendStreamOptions,
): Promise<WebTransportBidirectionalStream> Parameters
Optional
options: WebTransportSendStreamOptions
Returns Promise<WebTransportBidirectionalStream>
createUnidirectionalStream
- createUnidirectionalStream(
options?: WebTransportSendStreamOptions,
): Promise<WritableStream> Parameters
Optional
options: WebTransportSendStreamOptions
Returns Promise<WritableStream>
Available only in secure contexts.
MDN Reference