##### basic_socket::available (2 of 2 overloads)

Determine the number of bytes available for reading.

    std::size_t available(
        asio::error_code & ec) const;

This function is used to determine the number of bytes that may be read without blocking.

###### Parameters

ec

  Set to indicate what error occurred, if any.

###### Return Value

The number of bytes that may be read without blocking, or 0 if an error occurs.