pub async fn recv_frame<T: Stream>(
stream: &mut T,
max_message_size: usize,
) -> Result<Bytes, Error>
Expand description
Receives data from the stream with a 4-byte length prefix. Returns an error if the message is too large or the stream is closed.