MCPcopy Create free account
hub / github.com/boostorg/asio / available

Function available

include/boost/asio/basic_socket.hpp:748–755  ·  view source on GitHub ↗

Determine the number of bytes available for reading. * This function is used to determine the number of bytes that may be read * without blocking. * * @return The number of bytes that may be read without blocking, or 0 if an * error occurs. * * @throws boost::system::system_error Thrown on failure. */

Source from the content-addressed store, hash-verified

746 * @throws boost::system::system_error Thrown on failure.
747 */
748 std::size_t available() const
749 {
750 boost::system::error_code ec;
751 std::size_t s = impl_.get_service().available(
752 impl_.get_implementation(), ec);
753 boost::asio::detail::throw_error(ec, "available");
754 return s;
755 }
756
757 /// Determine the number of bytes available for reading.
758 /**

Callers 3

availableMethod · 0.85
availableMethod · 0.85
availableMethod · 0.85

Calls 2

throw_errorFunction · 0.85
availableMethod · 0.45

Tested by

no test coverage detected