pub async fn read_frame_bytes_within<R>( reader: &mut R, max: u32, ) -> Result<Vec<u8>, CodecError>where R: AsyncRead + Unpin,
As read_frame_bytes, refusing a frame longer than max (at most MAX_FRAME) before anything is allocated for it.
read_frame_bytes
max
MAX_FRAME