seyd_transport/lib.rs
1// Copyright 2026 Anton Gravestam
2// SPDX-License-Identifier: Apache-2.0
3//! Seyd transport: QUIC on quinn, serving WebTransport (ALPN `h3`) to browser
4//! pilots. See `docs/adr/0002-quinn.md`.
5//!
6//! What this crate owns: sockets it is *handed* (never binds its own — STUN and
7//! hole-punch probes go out of the same socket QUIC uses), certificates pinned
8//! by `serverCertificateHashes`, the accept loop, and a [`Session`] per
9//! WebTransport session with datagrams, the pilot-opened control stream, and
10//! path statistics. It knows nothing about chunks, FEC or channels.
11//!
12//! A [`Session`] is normally a WebTransport session over QUIC. When no direct
13//! path connected, the same type can be backed by the cloud relay (`relay`,
14//! ADR 0010): the engine is unchanged, and `Session::kind` says which it is.
15//!
16//! Datagram admission is the caller's job through [`Session::send_buffer_space`]
17//! and [`Session::send_datagram`]. quinn discards *older* queued datagrams when
18//! its buffer is full, which is exactly the torn-frame outcome Seyd forbids, so
19//! `send_datagram` refuses with [`SendError::Blocked`] instead of letting that
20//! happen.
21
22pub mod cert;
23mod endpoint;
24mod prober;
25pub mod relay;
26pub mod session;
27mod webtransport;
28
29pub use cert::Cert;
30pub use endpoint::{Congestion, Endpoint, TransportConfig};
31pub use prober::Prober;
32pub use session as control;
33pub use session::{ControlReader, ControlWriter, PathStats, SendError, Session, SessionKind};