Method lrs::socket::Socket::pending_input

Retrieves the amount of available data.

Syntax

impl Socket {
    fn pending_input(&self) -> Result<usize, Errno>
}

Return value

Returns the number of bytes available for reading.

Remarks

For streaming sockets, this is the total number of bytes available. For datagram sockets, this is the size of the next message.

See also