1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
//! QMux protocol (draft-ietf-quic-qmux-02) over reliable transports.
//!
//! Provides QUIC-style multiplexed streams over TCP, TLS, and WebSocket.
//! Speaks draft-02 by default, negotiating down to draft-01 or draft-00, with
//! backwards compatibility for the legacy `webtransport` wire format.
//!
//! # Layout
//!
//! The crate root holds the transport-independent session API: [`Session`] and
//! its [`SendStream`] / [`RecvStream`] halves, plus the [`Config`], [`Version`],
//! and [`Error`] types they share.
//!
//! Everything tied to a specific transport lives in that transport's module, so
//! the generic names stay unambiguous when several are in scope at once:
//!
//! | Module | Entry point | Feature |
//! | --- | --- | --- |
//! | `tcp` | `tcp::Config` | `tcp` |
//! | `uds` | `uds::Config` | `uds` (Unix only) |
//! | `tls` | `tls::Client`, `tls::Server` | `tls` |
//! | `ws` | `ws::Client`, `ws::Server`, `ws::Upgraded` | `ws` |
//! | [`transport`] | [`transport::Stream`] | `tcp` or `uds` |
//!
//! For anything the built-in modules don't cover, wrap an
//! [`AsyncRead`](tokio::io::AsyncRead) + [`AsyncWrite`](tokio::io::AsyncWrite)
//! byte stream in [`transport::Stream`], or implement
//! [`transport::Transport`] yourself, and pass it to [`Session::connect`] /
//! [`Session::accept`].
// ALPN/subprotocol negotiation is only used by the TLS and WebSocket transports.
/// Transport abstraction and the byte-stream [`transport::Stream`] implementation.
/// Plain TCP transport.
/// Unix domain socket transport.
/// TLS over TCP transport.
/// WebSocket transport.
use *;
pub use ;
pub use Error;
pub use Version;
pub use ;
pub use ;
// Transport-specific types are deliberately *not* re-exported here; they stay
// behind their module path (`transport::Transport`, `ws::Client`, `tls::Client`,
// ...) so that names shared across transports don't collide at the crate root.
/// All supported ALPN identifiers, in preference order.
///
/// Use this when configuring TLS to advertise QMux support.
/// For version-specific ALPNs, use [`Version::alpn()`].
pub const ALPNS: & = &;