Skip to main content

Module parser

Module parser 

Source
Expand description

Turning bytes into messages.

One implementation serves both transports. parse_datagram frames a message from a single packet; StreamParser frames messages out of a byte stream arriving in arbitrary chunks. They share every rule, so a message parses identically however it arrived — a property the tests assert directly by splitting each corpus message at every byte offset.

See docs/specs/sip-parser.md for the normative rules and the reasoning behind the choices the RFC leaves open.

Structs§

Limits
Bounds on what the parser will accept.
StreamParser
Frames messages out of a byte stream.

Functions§

parse_datagram
Parse exactly one message from a datagram.