Expand description
muxtls provides multiplexed bidirectional streams over TLS/TCP.
The crate offers a small async transport API:
Endpointfor client and server setupConnectingfuture for client handshakesConnectionfor opening and accepting streamsSendStreamandRecvStreamfor per-stream I/O
Wire protocol primitives live in the muxtls-proto.
§Design scope
muxtls intentionally focuses on TLS/TCP transport semantics.
§Example
use muxtls::{ClientConfig, Endpoint};
use std::net::SocketAddr;
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);Structs§
- Client
Config - Client-side TLS configuration wrapper.
- Connecting
- Future returned by
Endpoint::connect. - Connection
- A live multiplexed TLS/TCP connection.
- Connection
Stats - Runtime statistics for a connection.
- Endpoint
- Network endpoint used to initiate or accept muxtls connections.
- Limits
- Resource and protocol limits enforced per connection.
- Recv
Stream - Readable half of a bidirectional stream.
- Send
Stream - Writable half of a bidirectional stream.
- Server
Config - Server-side TLS configuration wrapper.
Enums§
- Error
- Errors returned by muxtls APIs and runtime.
Type Aliases§
- Result
- Result type used by this crate.