#include <descriptor_base.hpp>
Public Types | |
typedef asio::detail::io_control::bytes_readable | bytes_readable |
typedef asio::detail::io_control::non_blocking_io | non_blocking_io |
IO control command to set the blocking mode of the descriptor. | |
Protected Member Functions | |
~descriptor_base () | |
Protected destructor to prevent deletion through this type. |
The descriptor_base class is used as a base for the basic_stream_descriptor class template so that we have a common place to define the associated IO control commands.
Definition at line 34 of file descriptor_base.hpp.
IO control command to get the amount of data that can be read without blocking. Implements the FIONREAD IO control command.
asio::posix::stream_descriptor descriptor(io_service);
...
asio::descriptor_base::bytes_readable command(true);
descriptor.io_control(command);
std::size_t bytes_readable = command.get();
Definition at line 78 of file descriptor_base.hpp.
IO control command to set the blocking mode of the descriptor.
Implements the FIONBIO IO control command.
asio::posix::stream_descriptor descriptor(io_service);
...
asio::descriptor_base::non_blocking_io command(true);
descriptor.io_control(command);
Definition at line 55 of file descriptor_base.hpp.
asio::posix::descriptor_base::~descriptor_base | ( | ) | [inline, protected] |
Protected destructor to prevent deletion through this type.
Definition at line 83 of file descriptor_base.hpp.