13#include <netinet/in.h> 
   14#include <boost/shared_ptr.hpp> 
   15#include <sys/socket.h> 
   28    IOServiceImpl& operator=(
const IOService& source);
 
   33        work_(boost::asio::make_work_guard(io_service_)) {
 
 
   56        return (
static_cast<size_t>(io_service_.run_one()));
 
 
   66        return (
static_cast<size_t>(io_service_.poll()));
 
 
   76        return (
static_cast<size_t>(io_service_.poll_one()));
 
 
   90        return (io_service_.stopped());
 
 
   95        io_service_.restart();
 
 
  111        return (io_service_);
 
 
  117    void post(
const std::function<
void ()>& callback) {
 
  118        boost::asio::post(io_service_, callback);
 
 
  122    boost::asio::io_context io_service_;
 
  123    boost::asio::executor_work_guard<boost::asio::io_context::executor_type> work_;
 
 
  139    return (io_impl_->runOne());
 
 
  144    return (io_impl_->poll());
 
 
  149    return (io_impl_->pollOne());
 
 
  159    return (io_impl_->stopped());
 
 
  169    io_impl_->stopWork();
 
 
  172boost::asio::io_context&
 
  174    return (io_impl_->getInternalIOService());
 
 
  179    return (io_impl_->post(callback));
 
 
IOServiceImpl()
The constructor.
~IOServiceImpl()=default
The destructor.
boost::asio::io_context & getInternalIOService()
Return the native io_context object used in this wrapper.
void run()
Start the underlying event loop.
void stopWork()
Removes IO service work object to let it finish running when all handlers have been invoked.
size_t poll()
Run the underlying event loop for a ready events.
size_t pollOne()
Run the underlying event loop for a ready events.
void stop()
Stop the underlying event loop.
void restart()
Restarts the IOService in preparation for a subsequent run() invocation.
size_t runOne()
Run the underlying event loop for a single event.
void post(const std::function< void()> &callback)
Post a callback on the IO service.
bool stopped() const
Indicates if the IOService has been stopped.
The IOService class is a wrapper for the ASIO io_context class.
~IOService()
The destructor.
void run()
Start the underlying event loop.
size_t pollOne()
Run the underlying event loop for a ready events.
IOService()
The constructor.
boost::asio::io_context & getInternalIOService()
Return the native io_context object used in this wrapper.
size_t runOne()
Run the underlying event loop for a single event.
void stopAndPoll(bool ignore_errors=true)
Stop and poll to handle all registered events.
void stop()
Stop the underlying event loop.
void restart()
Restarts the IOService in preparation for a subsequent run() invocation.
bool stopped() const
Indicates if the IOService has been stopped.
void stopWork()
Removes IO service work object to let it finish running when all handlers have been invoked.
size_t poll()
Run the underlying event loop for a ready events.
void post(const std::function< void()> &callback)
Post a callback to the end of the queue.
Defines the logger used by the top-level component of kea-lfc.