web_transport_quiche/
lib.rs

1//! WebTransport is a protocol for client-server communication over QUIC.
2//! It's [available in the browser](https://caniuse.com/webtransport) as an alternative to HTTP and WebSockets.
3//!
4//! WebTransport is layered on top of HTTP/3 which is then layered on top of QUIC.
5//! This library hides that detail and tries to expose only the QUIC API, delegating as much as possible to the underlying implementation.
6//! See the [quiche documentation](https://docs.rs/quiche/latest/quiche/) for more documentation.
7//!
8//! QUIC provides two primary APIs:
9//!
10//! # Streams
11//! QUIC streams are ordered, reliable, flow-controlled, and optionally bidirectional.
12//! Both endpoints can create and close streams (including an error code) with no overhead.
13//! You can think of them as TCP connections, but shared over a single QUIC connection.
14//!
15//! # Datagrams
16//! QUIC datagrams are unordered, unreliable, and not flow-controlled.
17//! Both endpoints can send datagrams below the MTU size (~1.2kb minimum) and they might arrive out of order or not at all.
18//! They are basically UDP packets, except they are encrypted and congestion controlled.
19//!
20//! # Limitations
21//! WebTransport is able to be pooled with HTTP/3 and multiple WebTransport sessions.
22//! This crate avoids that complexity, doing the bare minimum to support a single WebTransport session that owns the entire QUIC connection.
23//! If you want to support HTTP/3 on the same host/port, you should use another crate (ex. `h3-webtransport`).
24//! If you want to support multiple WebTransport sessions over the same QUIC connection... you should just dial a new QUIC connection instead.
25
26pub mod ez;
27pub mod h3;
28
29mod client;
30mod connection;
31mod error;
32mod recv;
33mod send;
34mod server;
35
36pub use client::*;
37pub use connection::*;
38pub use error::*;
39pub use recv::*;
40pub use send::*;
41pub use server::*;
42
43pub use ez::{CertificateKind, CertificatePath, Settings};
44
45pub use web_transport_proto as proto;