MDN self-hosted library · e01.org

WebTransport: anticipatedConcurrentIncomingBidirectionalStreams property

Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.

js
const url = "https://example.com:4999/wt";

const transport = new WebTransport(url);
console.log(transport.anticipatedConcurrentIncomingBidirectionalStreams); // null
js
const busyTransport = new WebTransport(url, {
  anticipatedConcurrentIncomingBidirectionalStreams: 300,
});
console.log(busyTransport.anticipatedConcurrentIncomingBidirectionalStreams); // 300
js
const transport = new WebTransport("https://example.com:4999/wt", {
  anticipatedConcurrentIncomingBidirectionalStreams: 300,
});
await transport.ready;

// The application now expects the server to open more streams
transport.anticipatedConcurrentIncomingBidirectionalStreams = 600;
console.log(transport.anticipatedConcurrentIncomingBidirectionalStreams); // 600