W3cubDocs

/Web APIs

WebTransportReceiveStream

Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.

The WebTransportReceiveStream interface of the WebTransport API is a ReadableStream that can be used to read from an incoming unidirectional or bidirectional WebTransport stream from a server.

The stream is a readable byte stream of Uint8Array, 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 the WebTransport.incomingUnidirectionalStream property.

WebTransportReceiveStream is a transferable object.

ReadableStream WebTransportReceiveStream

Note: This feature is available in Web Workers

Instance properties

Inherits properties from its parent interface, ReadableStream.

Instance methods

Also inherits properties from its parent interface, ReadableStream.

WebTransportReceiveStream.getStats() Experimental

Returns a Promise that resolves with statistics related to this stream.

Examples

See WebTransport.incomingUnidirectionalStreams for an example of how to get a ReadableStream of WebTransportReceiveStream objects.

Specifications

Browser compatibility

Desktop Mobile
Chrome Edge Firefox Internet Explorer Opera Safari WebView Android Chrome Android Firefox for Android Opera Android Safari on IOS Samsung Internet
WebTransportReceiveStream No No 114 No No No No No 114 No No No
getStats No No 114 No No No No No 114 No No No

See also

© 2005–2023 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/WebTransportReceiveStream