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. */
| 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 | /** |
no test coverage detected