Module rustls::unbuffered

source ·
Expand description

Unbuffered connection API

This is an alternative to the crate::ConnectionCommon API that does not internally buffer TLS nor plaintext data. Instead those buffers are managed by the API user so they have control over when and how to allocate, resize and dispose of them.

This API is lower level than the ConnectionCommon API and is built around a state machine interface where the API user must handle each state to advance and complete the handshake process.

Like the ConnectionCommon API, no IO happens internally so all IO must be handled by the API user. Unlike the ConnectionCommon API, this API does not make use of the std::io::Read and std::io::Write traits so it’s usable in no-std context.

The entry points into this API are crate::client::UnbufferedClientConnection::new, crate::server::UnbufferedServerConnection::new and unbuffered::UnbufferedConnectionCommon::process_tls_records. The state machine API is documented in unbuffered::ConnectionState.

§Examples

unbuffered-client and unbuffered-server are examples that fully exercise the API in std, non-async context.

Structs§

Enums§