Skip to main content

try_parse

Function try_parse 

Source
pub fn try_parse(buf: &[u8]) -> Option<(u8, usize, usize)>
Expand description

Try to parse a complete frame from the front of buf. Returns Some((msg_type, payload_start, total_len)) if a full frame is available, None if more data is needed.