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.
- Inbound
Bidi Stream - An inbound bidirectional WebTransport stream opened by the client.
- Inbound
UniStream - An inbound unidirectional WebTransport stream opened by the client.
- Outbound
Bidi Stream - A server-initiated bidirectional WebTransport stream.
- Outbound
UniStream - A server-initiated unidirectional WebTransport stream.
- WebTransport
- A Trillium
Handlerthat accepts WebTransport sessions. - WebTransport
Connection - A handle to an active WebTransport session.
Enums§
- Inbound
Stream - 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_bufferfor tuning semantics.
Traits§
- WebTransport
Handler - A handler for WebTransport sessions.