v155 · webtransport · datagrams

Priority lanes

An urgent lane and a bulk lane over one connection. On a Chrome 155+ build this page creates two real WebTransportDatagramsWritable streams with different sendOrders, writes real datagrams into their queues (legal while the transport is still connecting), and promotes a lane mid-flight by assigning its sendOrder. On an older build it pushes the same traffic through the one legacy door — so you can see exactly what the feature adds.

Chrome targets this for Chrome 155 behind WebTransportDatagramsWritable (+ its WebTransportSendGroup dependency): --enable-blink-features=WebTransportSendGroup,WebTransportDatagramsWritable, or chrome://flags/#enable-experimental-web-platform-features. No HTTP/3 endpoint is reachable here, so queued datagrams never hit a wire — what this page shows is the real client-side API: creation, options, mutation, and queueing. On-the-wire drain order between lanes needs a live server and is recorded as unexecuted, not simulated.

Open the lanes

API in use → … datagrams.maxDatagramSize → … connection → …

urgent lanesendOrder ?

no writes yet

bulk lanesendOrder ?

no writes yet

code path

const dg = transport.datagrams;
const urgent = dg.createWritable({ sendOrder: 10 });
const bulk   = dg.createWritable({ sendOrder: 1 });

// FIFO within a lane; higher sendOrder drains first across lanes.
urgent.getWriter();   // keep one writer per lane
bulk.sendOrder = 20;  // live promotion — the attribute is mutable

// Pre-155 the only option was one shared queue:
const onlyDoor = dg.writable.getWriter();   // everything FIFO together

see also