pub trait NonBlocking {
// Required methods
fn nb_recv(&mut self) -> Result<Vec<Box<dyn Frame>>>;
fn nb_send(&mut self, frame: &dyn Frame) -> Result<()>;
}Expand description
The NonBlocking trait provides method definitions for use with non-blocking streams.
Required Methods§
Sourcefn nb_recv(&mut self) -> Result<Vec<Box<dyn Frame>>>
fn nb_recv(&mut self) -> Result<Vec<Box<dyn Frame>>>
Performs a non-blocking read on the underlying stream until ErrorKind::WouldBlock or an
std::io::Error has occurred.
§simple_stream::Secure notes
Unlike its blocking counterpart, errors received on the OpenSSL level will be returned as
ErrorKind::Other with various OpenSSL error information as strings in the description
field of the std::io::Error.
Sourcefn nb_send(&mut self, frame: &dyn Frame) -> Result<()>
fn nb_send(&mut self, frame: &dyn Frame) -> Result<()>
Performs a non-blocking send on the underlying stream until ErrorKind::WouldBlock or an
std::io::Error has occurred.
§simple_stream::Secure notes
Unlike its blocking counterpart, errors received on the OpenSSL level will be returned as
ErrorKind::Other with various OpenSSL error information as strings in the description
field of the std::io::Error.