Skip to main content

decode_header

Function decode_header 

Source
pub fn decode_header(buf: &[u8]) -> Result<(Header, &[u8]), MessageError>
Expand description

Decode a header from buf, returning the header and a slice of the remaining payload bytes.

Validates magic bytes, protocol version, and message type.