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 Connection::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.
Trait Implementations§
impl Eq for IoState
impl StructuralPartialEq for IoState
Auto Trait Implementations§
impl Freeze for IoState
impl RefUnwindSafe for IoState
impl Send for IoState
impl Sync for IoState
impl Unpin for IoState
impl UnsafeUnpin for IoState
impl UnwindSafe for IoState
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more