Skip to main content

parse_prefix

Function parse_prefix 

Source
pub fn parse_prefix(input: &[u8]) -> Result<(Bencode, &[u8]), Error>
Expand description

Parse one bencoded value from the front of input, returning the value and the unconsumed tail. Used when bencoded values are framed inside a larger stream (the peer-wire extension handshake, KRPC).

§Errors

Any of Error.