Skip to main content

Reader

Trait Reader 

Source
pub trait Reader: Send {
    // Required methods
    fn next_packet(&mut self) -> Result<&[u8]>;
    fn next_packet_with_metadata(&mut self) -> Result<(&[u8], PacketMetadata)>;
}
Expand description

Trait describing a packet reader

Required Methods§

Source

fn next_packet(&mut self) -> Result<&[u8]>

Returns the next packet off of the wire

Source

fn next_packet_with_metadata(&mut self) -> Result<(&[u8], PacketMetadata)>

Returns the next packet off of the wire along with metadata

Implementors§