Skip to main content

Crate trillium_webtransport

Crate trillium_webtransport 

Source
Expand description

WebTransport support for Trillium.

This crate provides a WebTransport handler that accepts WebTransport sessions over HTTP/3, and a WebTransportConnection handle for sending and receiving streams and datagrams within each session.

WebTransport requires an HTTP/3-capable server adapter configured with a QUIC endpoint and TLS.

§Client

WebTransportConnection is also the type returned by trillium_client’s Client::webtransport(url).into_webtransport().await (cargo feature webtransport on trillium-client). The client API is symmetric with the server: the same accept_bidi / accept_uni / recv_datagram / open_bidi / open_uni / send_datagram methods work on either side. Multiple client sessions to the same origin coalesce onto a single underlying QUIC connection.

Structs§

Datagram
A received WebTransport datagram.
InboundBidiStream
An inbound bidirectional WebTransport stream opened by the client.
InboundUniStream
An inbound unidirectional WebTransport stream opened by the client.
OutboundBidiStream
A server-initiated bidirectional WebTransport stream.
OutboundUniStream
A server-initiated unidirectional WebTransport stream.
WebTransport
A Trillium Handler that accepts WebTransport sessions.
WebTransportConnection
A handle to an active WebTransport session.

Enums§

InboundStream
An inbound WebTransport stream, yielded by WebTransportConnection::accept_next_stream.

Constants§

DEFAULT_MAX_DATAGRAM_BUFFER
Default datagram buffer cap per session: 16 datagrams. See WebTransport::with_max_datagram_buffer for tuning semantics.

Traits§

WebTransportHandler
A handler for WebTransport sessions.