Skip to main content

Crate muxtls

Crate muxtls 

Source
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§

ClientConfig
Client-side TLS configuration wrapper.
Connecting
Future returned by Endpoint::connect.
Connection
A live multiplexed TLS/TCP connection.
ConnectionStats
Runtime statistics for a connection.
Endpoint
Network endpoint used to initiate or accept muxtls connections.
Limits
Resource and protocol limits enforced per connection.
PeerIdentity
The certificate chain associated with the completed TLS handshake.
RecvStream
Readable half of a bidirectional stream.
SendStream
Writable half of a bidirectional stream.
ServerConfig
Server-side TLS configuration wrapper.

Enums§

Error
Errors returned by muxtls APIs and runtime.

Type Aliases§

Result
Result type used by this crate.