展开描述
非缓冲连接 API
This 是 alternative 到 the crate::ConnectionCommon API that does not internally 缓冲区
TLS nor 明文 data. Instead those buffers are managed by the API user so they have
control over when 并 how 到 allocate, resize 并 dispose of them.
This API is lower level than the ConnectionCommon API 并 is built around 一个 state machine
interface where the API user must handle each state 到 advance 并 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 并
std::io::Write traits so it’s usable in no-std context.
此 entry points into this API are crate::client::UnbufferedClientConnection::new,
crate::server::UnbufferedServerConnection::new 并
unbuffered::UnbufferedConnectionCommon::process_tls_records。 此 state machine API is
documented in unbuffered::ConnectionState。
§示例
unbuffered-client 并 unbuffered-server are examples that fully exercise the API in
std, non-async context.
结构体§
- AppData
Record - A decrypted application-data record
- Encode
TlsData - A handshake record must be encoded
- Insufficient
Size Error - Provided buffer was too small
- Read
Early Data - Early application-data is available.
- Read
Traffic - Application data is available
- Transmit
TlsData - Previously encoded TLS data must be transmitted
- Unbuffered
Connection Common - Interface shared by unbuffered client and server connections.
- Unbuffered
Status - The current status of the
UnbufferedConnection* - Write
Traffic - Allows encrypting app-data
枚举§
- Connection
State - The state of the
UnbufferedConnectionCommonobject - Encode
Error - Errors that may arise when encoding a handshake record
- Encrypt
Error - Errors that may arise when encrypting application data