pub fn parse_datagram(
buf: Bytes,
limits: &Limits,
) -> Result<Message, ParseError>Expand description
Parse exactly one message from a datagram.
Octets after the body are ignored, not rejected: RFC 3261 §18.3 says a datagram carries at most one message and the rest is noise, and RFC 4475 §3.1.1.8 makes a test of it. They are not part of the message and are not forwarded.