[−][src]Function grin_p2p::msg::read_header
pub fn read_header(
stream: &mut dyn Read,
version: ProtocolVersion
) -> Result<MsgHeaderWrapper, Error>
Read a header from the provided stream without blocking if the underlying stream is async. Typically headers will be polled for, so we do not want to block.
Note: We return a MsgHeaderWrapper here as we may encounter an unknown msg type.