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
sourceimpl 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.
Trait Implementations
impl StructuralPartialEq for IoState
Auto Trait Implementations
impl RefUnwindSafe for IoState
impl Send for IoState
impl Sync for IoState
impl Unpin for IoState
impl UnwindSafe for IoState
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more