fn read_reason_phrase(buf: &mut impl Buf) -> Result<Vec<u8>, CodecError>Expand description
Read a Reason Phrase, holding it to the cap this draft states for a receiver.
“The reason phrase length has a maximum value of 1024 bytes. If an endpoint receives a length exceeding the maximum, it MUST close the session with a PROTOCOL_VIOLATION”. The sentence is about what an endpoint receives, and receiving was the direction the cap was not applied to: the encoders refused an over-long phrase and the decoders accepted one.