Function maelstrom_util::net::read_message_from_async_socket

source ยท
pub async fn read_message_from_async_socket<MessageT>(
    stream: &mut (impl AsyncRead + Unpin)
) -> Result<MessageT>
where MessageT: DeserializeOwned,
Expand description

Read a message from a Tokio input stream. The framing must match that of write_message_to_socket and write_message_to_async_socket.