v158 · webtransport · congestion control
Session builder: compose the real options object
The congestion-control preference travels in the same dictionary as requireUnreliable and allowPooling, and the combination matters: a pooled session shares a connection — and its congestion controller — with other sessions, and a reliable-only fallback changes what "low latency" can even mean. Build the real options object here, run the actual constructor against any endpoint you like, and watch the session settle with the attribute sampled at every step.
Chrome targets congestionControl for Chrome 158 behind the WebTransportCongestionControl runtime flag (--enable-blink-features=WebTransportCongestionControl, or chrome://flags/#enable-experimental-web-platform-features). This showcase has no HTTP/3 server of its own, so the default endpoint is a public echo server — if it is unreachable from your network the attempt fails with the real error, which the log below reports as-is. A connection failure is an honest outcome here, never a faked session.
1 · Compose WebTransportOptions
A hint. The attribute reports what was actually granted.
Any WebTransport server you can reach. The error, if any, is shown verbatim.
Pooled sessions share one connection — and one congestion controller.
…
2 · Run the real constructor
| t (ms) | step | result |
|---|---|---|
| No attempt yet. | ||
code path
const options = {
congestionControl: "low-latency",
requireUnreliable: false,
allowPooling: false,
};
const transport = new WebTransport(url, options);
transport.congestionControl; // granted preference — readable immediately
try {
await transport.ready; // establishment (needs a reachable HTTP/3 server)
} catch (e) {
// the REAL failure: name + message, surfaced, never swallowed
}