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
//! `net-mux` is an asynchronous connection multiplexing library built on
//! Tokio.
//!
//! It multiplexes a single ordered, connection-oriented byte stream
//! (TCP, KCP, TLS-over-TCP, ...) into many bidirectional logical streams
//! with credit-based flow control, ping keepalive, and graceful shutdown.
//!
//! # Quick start
//!
//! ```no_run
//! use net_mux::{Config, Session};
//! use tokio::net::TcpStream;
//!
//! # async fn run() -> Result<(), Box<dyn std::error::Error>> {
//! let conn = TcpStream::connect("127.0.0.1:7777").await?;
//! let session = Session::client(conn, Config::default());
//!
//! let mut stream = session.open().await?;
//! tokio::io::AsyncWriteExt::write_all(&mut stream, b"hello").await?;
//! # Ok(()) }
//! ```
//!
//! See the `examples/` directory for end-to-end demos.
pub use crate;
pub use crate;
pub use crateSession;
pub use crateStream;
pub use crateStreamId;