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
//! `muxtls` provides multiplexed bidirectional streams over TLS/TCP.
//!
//! Use [`Endpoint`] to connect or accept, then [`Connection::open_bi`] or
//! [`Connection::accept_bi`] to obtain independent send and receive halves.
//! Keep a connection handle alive until its streams have finished.
//!
//! # 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;