pub fn decode_frame(
buf: &[u8],
max_frame_bytes: usize,
) -> Result<Frame, CodecError>Expand description
Decode one complete length-prefixed frame from buf against an explicit
max_frame_bytes bound. See FrameCodec::decode for the contract.
max_frame_bytes is PAYLOAD-ONLY: the maximum JSON payload length, not
counting the 4-byte prefix. Passing a total wire length here is a caller
bug — it admits payloads 4 bytes over the intended bound.