[][src]Function grin_p2p::msg::read_item

pub fn read_item<T: Readable, R: Read>(
    stream: &mut R,
    version: ProtocolVersion
) -> Result<(T, u64), Error>

Read a single item from the provided stream, always blocking until we have a result (or timeout). Returns the item and the total bytes read.