WebTransportReceiveStream
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
Experimental:This is anexperimental technology
Check theBrowser compatibility table carefully before using this in production.
Secure context: This feature is available only insecure contexts (HTTPS), in some or allsupporting browsers.
Note: This feature is available inWeb Workers.
TheWebTransportReceiveStream interface of theWebTransport API is aReadableStream that can be used to read from an incoming unidirectional or bidirectionalWebTransport stream.
The stream is areadable byte stream ofUint8Array, and can be consumed using either a BYOB reader (ReadableStreamBYOBReader) or the default reader (ReadableStreamDefaultReader).
Objects of this type are not constructed directly.Instead they are obtained using theWebTransport.incomingUnidirectionalStream property.
WebTransportReceiveStream is atransferable object.
In this article
Instance properties
Inherits properties from its parent interface,ReadableStream.
Instance methods
Also inherits properties from its parent interface,ReadableStream.
WebTransportReceiveStream.getStats()ExperimentalReturns a
Promisethat resolves with statistics related to this stream.
Examples
SeeWebTransport.incomingUnidirectionalStreams for an example of how to get aReadableStream ofWebTransportReceiveStream objects.
Specifications
| Specification |
|---|
| WebTransport> # webtransportreceivestream> |