[][src]Function onc_rpc::expected_message_len

pub fn expected_message_len(data: &[u8]) -> Result<u32, Error>

Reads the message header from data, and returns the expected wire length of the RPC message.

data must contain at least 4 bytes, and must be the start of an RPC message for this call to return valid data. If the message does not have the last fragment bit set, Error::Fragmented is returned.