[][src]Function grin_p2p::msg::read_header

pub fn read_header(
    stream: &mut dyn Read,
    msg_type: Option<Type>
) -> Result<MsgHeader, 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.