Skip to main content

read_pdu_from_wire

Function read_pdu_from_wire 

Source
pub fn read_pdu_from_wire<R>(
    reader: &mut R,
    read_buffer: &mut BytesMut,
    max_pdu_length: u32,
    strict: bool,
) -> Result<Pdu, Error>
where R: Read,
Expand description

Helper function to get a PDU from a reader.

Chunks of data are read into read_buffer, which should be passed in subsequent calls to receive more PDUs from the same stream.