 |
Kea
1.5.0
|
Go to the documentation of this file.
12 #include <netinet/in.h>
13 #include <boost/shared_ptr.hpp>
14 #include <sys/socket.h>
23 class CallbackWrapper {
25 CallbackWrapper(
const boost::function<
void()>& callback) :
32 boost::function<void()> callback_;
44 work_(new
boost::asio::io_service::work(io_service_))
64 io_service_.run_one();
78 void stop() { io_service_.stop();} ;
93 void post(
const boost::function<
void ()>& callback) {
94 const CallbackWrapper wrapper(callback);
95 io_service_.post(wrapper);
98 boost::asio::io_service io_service_;
99 boost::shared_ptr<boost::asio::io_service::work> work_;
135 boost::asio::io_service&
142 return (io_impl_->
post(callback));
boost::asio::io_service & get_io_service()
Return the native io_service object used in this wrapper.
void run()
Start the underlying event loop.
boost::asio::io_service & get_io_service()
Return the native io_service object used in this wrapper.
void stopWork()
Removes IO service work object to let it finish running when all handlers have been invoked.
void run_one()
Run the underlying event loop for a single event.
The IOService class is a wrapper for the ASIO io_service class.
void poll()
Run the underlying event loop for a ready events.
void poll()
Run the underlying event loop for a ready events.
Defines the logger used by the top-level component of kea-dhcp-ddns.
IOService()
The constructor.
~IOService()
The destructor.
void post(const boost::function< void()> &callback)
void stop()
Stop the underlying event loop.
void stop()
Stop the underlying event loop.
void run_one()
Run the underlying event loop for a single event.
void run()
Start the underlying event loop.
A wrapper interface for the ASIO library.
IOServiceImpl()
The constructor.
~IOServiceImpl()
The destructor.
void stopWork()
Removes IO service work object to let it finish running when all handlers have been invoked.
void post(const boost::function< void()> &callback)
Post a callback to the end of the queue.