Kea  1.5.0
isc::asiolink::IOServiceImpl Class Reference

Public Member Functions

 IOServiceImpl ()
 The constructor. More...
 
 ~IOServiceImpl ()
 The destructor. More...
 
boost::asio::io_service & get_io_service ()
 Return the native io_service object used in this wrapper. More...
 
void poll ()
 Run the underlying event loop for a ready events. More...
 
void post (const boost::function< void()> &callback)
 
void run ()
 Start the underlying event loop. More...
 
void run_one ()
 Run the underlying event loop for a single event. More...
 
void stop ()
 Stop the underlying event loop. More...
 
void stopWork ()
 Removes IO service work object to let it finish running when all handlers have been invoked. More...
 

Detailed Description

Definition at line 36 of file io_service.cc.

Constructor & Destructor Documentation

◆ IOServiceImpl()

isc::asiolink::IOServiceImpl::IOServiceImpl ( )
inline

The constructor.

Definition at line 42 of file io_service.cc.

◆ ~IOServiceImpl()

isc::asiolink::IOServiceImpl::~IOServiceImpl ( )
inline

The destructor.

Definition at line 47 of file io_service.cc.

Member Function Documentation

◆ get_io_service()

boost::asio::io_service& isc::asiolink::IOServiceImpl::get_io_service ( )
inline

Return the native io_service object used in this wrapper.

This is a short term work around to support other Kea modules that share the same io_service with the authoritative server. It will eventually be removed once the wrapper interface is generalized.

Definition at line 92 of file io_service.cc.

Referenced by isc::asiolink::IOService::get_io_service().

◆ poll()

void isc::asiolink::IOServiceImpl::poll ( )
inline

Run the underlying event loop for a ready events.

This method executes handlers for all ready events and returns. It will return immediately if there are no ready events.

Definition at line 71 of file io_service.cc.

Referenced by isc::asiolink::IOService::poll().

◆ post()

void isc::asiolink::IOServiceImpl::post ( const boost::function< void()> &  callback)
inline

Definition at line 93 of file io_service.cc.

Referenced by isc::asiolink::IOService::post().

◆ run()

void isc::asiolink::IOServiceImpl::run ( )
inline

Start the underlying event loop.

This method does not return control to the caller until the stop() method is called via some handler.

Definition at line 54 of file io_service.cc.

Referenced by isc::asiolink::IOService::run().

◆ run_one()

void isc::asiolink::IOServiceImpl::run_one ( )
inline

Run the underlying event loop for a single event.

This method return control to the caller as soon as the first handler has completed. (If no handlers are ready when it is run, it will block until one is.)

Definition at line 63 of file io_service.cc.

Referenced by isc::asiolink::IOService::run_one().

◆ stop()

void isc::asiolink::IOServiceImpl::stop ( )
inline

Stop the underlying event loop.

This will return the control to the caller of the run() method.

Definition at line 78 of file io_service.cc.

Referenced by isc::asiolink::IOService::stop().

◆ stopWork()

void isc::asiolink::IOServiceImpl::stopWork ( )
inline

Removes IO service work object to let it finish running when all handlers have been invoked.

Definition at line 82 of file io_service.cc.

Referenced by isc::asiolink::IOService::stopWork().


The documentation for this class was generated from the following file: