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
//! `muxtls` provides multiplexed bidirectional streams over TLS/TCP.
//!
//! The crate offers a small async transport API:
//!
//! - [`Endpoint`] for client and server setup
//! - [`Connecting`] future for client handshakes
//! - [`Connection`] for opening and accepting streams
//! - [`SendStream`] and [`RecvStream`] for per-stream I/O
//!
//! Wire protocol primitives live in the `muxtls-proto`.
//!
//! # Design scope
//!
//! `muxtls` intentionally focuses on TLS/TCP transport semantics.
//!
//! # Example
//!
//! ```rust,no_run
//! use muxtls::{ClientConfig, Endpoint};
//! use std::net::SocketAddr;
//!
//! # #[tokio::main(flavor = "current_thread")]
//! # async fn main() -> muxtls::Result<()> {
//! let endpoint = Endpoint::client(ClientConfig::with_native_roots()?);
//! let addr: SocketAddr = SocketAddr::from(([127, 0, 0, 1], 4433));
//! let conn = endpoint.connect(addr, "localhost")?.await?;
//! let (send, recv) = conn.open_bi().await?;
//! let _ = (send, recv);
//! # Ok(())
//! # }
//! ```
pub use ;
pub use ;
pub use ;
pub use ;
pub use Limits;
pub use ;
pub use fuzz_connection_state;