pub fn encode_shutdown_communication(reason: &str) -> BytesExpand description
Encode a shutdown communication reason string (RFC 8203).
The format is: 1-byte length prefix + UTF-8 string, max 128 bytes.
If the reason exceeds 128 bytes, it is truncated at a char boundary.
An empty reason encodes as a zero-length field ([0]).