Skip to main content

parse_packet

Function parse_packet 

Source
pub fn parse_packet(datagram: &[u8]) -> Result<Packet, String>
Expand description

Parse a server→client packet.

Disambiguation, per the spec: success sequence numbers are ≥ 6, but the spec warns clients not to confuse e.g. seq 39 with a redirect — the distinction is that special packets have the literal single digit 1, 3, or 4 as their whole first token, and success first-packets carry a non-empty MIME token after the space, while continuations have a bare numeric header.