webtransport library

WebTransport support over QUIC.

Implements RFC 9220 and the WebTransport HTTP/3 protocol. This barrel exposes session management, capsule types, and stream registration for building WebTransport clients and servers.

Exports include:

Use this library when you need WebTransport semantics (unreliable datagrams and reliable streams) over HTTP/3. For the underlying QUIC transport, import quic.dart. For the full stack including HTTP/3 and libp2p, import quic_lib.dart.

See also:

  • quic_lib.dart — the full public API.
  • quic.dart — QUIC transport primitives.
  • http3.dart — HTTP/3 layer used by WebTransport.

Classes

Capsule
A WebTransport capsule consisting of a type, length, and payload.
CapsuleRouter
Routes WebTransport capsules to their associated WebTransportSession.
DatagramCapsule
A WebTransport datagram capsule (RFC 9220 Section 5.1).
GoawayCapsule
A WebTransport GOAWAY capsule (draft-ietf-webtrans-http3).
StreamCapsule
A WebTransport capsule that registers a stream for a session.
WebTransportSession
Manages the state of a single WebTransport session over HTTP/3.
WebTransportSessionManager
Manages multiple WebTransport sessions over a single QUIC connection.
WebTransportStreamId
Discriminator and encoder/decoder for WebTransport stream IDs.

Enums

CapsuleType
Capsule types for WebTransport over HTTP/3 (RFC 9220).
WebTransportStreamType
WebTransport stream type discriminator.