Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.
Secure context: This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.
The createBidirectionalStream()
method of the WebTransport
interface opens a bidirectional stream; it returns a WebTransportBidirectionalStream
object containing readable
and writable
properties, which can be used to reliably read from and write to the server.
"Reliable" means that transmission and order of data are guaranteed. This provides slower delivery (albeit faster than with WebSockets) than datagrams
, but is needed in situations where reliability and ordering are important, like chat applications.
Note: This feature is available in Web Workers