pub struct HandshakeJoiner { /* private fields */ }
Expand description
This works to reconstruct TLS handshake messages from individual TLS messages. It’s guaranteed that TLS messages output from this layer contain precisely one handshake payload.
Implementations§
source§impl HandshakeJoiner
impl HandshakeJoiner
sourcepub fn push(&mut self, msg: PlainMessage) -> Result<bool, JoinerError>
pub fn push(&mut self, msg: PlainMessage) -> Result<bool, JoinerError>
Take the message, and join/split it as needed.
Returns Err(JoinerError::Unwanted(msg))
if msg
’s type is not ContentType::Handshake
or
JoinerError::Decode
if a received payload has an advertised size larger than we accept.
Otherwise, yields a bool
to indicate whether the handshake is “aligned”: if the buffer currently
only contains complete payloads (that is, no incomplete message in the suffix).