Expand description
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
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.
- Peer
Identity - The certificate chain associated with the completed TLS handshake.
- 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.