pub fn read_packet_length(
len_of_len: u8,
bytes: &[u8],
) -> Result<Option<u32>, Error>Expand description
Reads the variable-length packet length from the bytes following the 2-byte mandatory header.
len_of_len is the value from the header’s Length of Length field.
bytes should start at the first byte after the mandatory header.