Struct rustls_fork_shadow_tls::IoState 
source · pub struct IoState { /* private fields */ }Expand description
Values of this structure are returned from Connection::process_new_packets
and tell the caller the current I/O state of the TLS connection.
Implementations§
source§impl IoState
 
impl IoState
sourcepub fn tls_bytes_to_write(&self) -> usize
 
pub fn tls_bytes_to_write(&self) -> usize
How many bytes could be written by CommonState::write_tls if called
right now.  A non-zero value implies CommonState::wants_write.
sourcepub fn plaintext_bytes_to_read(&self) -> usize
 
pub fn plaintext_bytes_to_read(&self) -> usize
How many plaintext bytes could be obtained via std::io::Read
without further I/O.
sourcepub fn peer_has_closed(&self) -> bool
 
pub fn peer_has_closed(&self) -> bool
True if the peer has sent us a close_notify alert. This is the TLS mechanism to securely half-close a TLS connection, and signifies that the peer will not send any further data on this connection.
This is also signalled via returning Ok(0) from
std::io::Read, after all the received bytes have been
retrieved.