← Back to release summary

WebTransportWriter: atomic writes and reliable stream reset

Category
Network / Connectivity
Type
New or changed feature
Status
Proposed (Chrome Proposed)
Intent stage
None

WPT details: Dedicated behavioral WPT coverage has not yet been added. Tests are planned for interface exposure and writer locking, flow-control rejection without stream failure, ordering of queued () followed by abort, connection-failure behavior, and Window and Worker exposure. This field will be updated when those tests land upstream.

Summary

Adds the WebTransportWriter interface for outgoing WebTransport streams. WebTransportSendStream.getWriter() returns a specialized writer extending  WritableStreamDefaultWriter with two methods. atomicWrite(data) admits the complete write only when sufficient stream and connection flow-control credit is available; if the complete chunk does not fit, none of it is admitted and the stream remains usable. commit()  marks successfully written bytes as a reliable prefix to be transmitted if the stream is subsequently aborted, provided the connection remains available. Atomic writes help prevent application-protocol flow-control deadlocks, but they do not preserve message boundaries or guarantee delivery in a single network packet.

Motivation

Applications commonly implement framed protocols over WebTransport streams. A normal stream write can be accepted only partially at the transport layer, which can cause a flow-control deadlock when the peer needs the complete frame before it can process data and release more credit. atomicWrite() provides all-or-nothing admission for these writes. commit() enables partial reliability: an application can commit an important prefix and later abort an obsolete suffix without losing the committed data. These capabilities are useful for real-time media, games, remote access, and other latency-sensitive applications.

Standards & signals

Ecosystem

Explainers: https://github.com/w3c/webtransport/blob/main/explainer.md#9-transactional-writes-and-reliable-reset

View on chromestatus.com