pub trait Blocking {
    // Required methods
    fn b_recv(&mut self) -> Result<Box<dyn Frame>>;
    fn b_send(&mut self, frame: &dyn Frame) -> Result<()>;
}
Expand description

The Blocking trait provides method definitions for use with blocking streams.

Required Methods§

source

fn b_recv(&mut self) -> Result<Box<dyn Frame>>

Performs a blocking read on the underlying stream until a complete Frame has been read or an std::io::Error has occurred.

source

fn b_send(&mut self, frame: &dyn Frame) -> Result<()>

Performs a blocking send on the underlying stream until a complete frame has been sent or an std::io::Error has occurred.

Implementors§

source§

impl<S, FB> Blocking for Plain<S, FB>where S: Read + Write, FB: FrameBuilder,

source§

impl<S, FB> Blocking for Secure<S, FB>where S: Read + Write, FB: FrameBuilder,