const url = "https://example.com:4999/wt";
const transport = new WebTransport(url);
console.log(transport.anticipatedConcurrentIncomingBidirectionalStreams); // nullWebTransport: anticipatedConcurrentIncomingBidirectionalStreams property
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.
const busyTransport = new WebTransport(url, {
anticipatedConcurrentIncomingBidirectionalStreams: 300,
});
console.log(busyTransport.anticipatedConcurrentIncomingBidirectionalStreams); // 300const 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