Kea  2.1.7-git
isc::asiolink::IOSignalSet Class Reference

Implements an asynchronous "signal" for IOService driven processing. More...

#include <io_service_signal.h>

Public Member Functions

 IOSignalSet (asiolink::IOServicePtr io_service, IOSignalHandler handler)
 Constructor. More...
 
 ~IOSignalSet ()=default
 Destructor. More...
 
void add (int signum)
 Add a signal to the list of signals to handle. More...
 
void remove (int signum)
 Remove a signal from the list of signals to handle. More...
 

Detailed Description

Implements an asynchronous "signal" for IOService driven processing.

This class allows a OS signal such as SIGHUP to propagated to an IOService as a ready event with a callback using boost ASIO.

Definition at line 26 of file io_service_signal.h.

Constructor & Destructor Documentation

◆ IOSignalSet()

isc::asiolink::IOSignalSet::IOSignalSet ( asiolink::IOServicePtr  io_service,
IOSignalHandler  handler 
)

Constructor.

Parameters
io_serviceIOService to which to send the signal.
handlerHandler to call when a signal is received.

Definition at line 112 of file io_service_signal.cc.

◆ ~IOSignalSet()

isc::asiolink::IOSignalSet::~IOSignalSet ( )
default

Destructor.

Member Function Documentation

◆ add()

void isc::asiolink::IOSignalSet::add ( int  signum)

Add a signal to the list of signals to handle.

Parameters
signumSignal number.
Exceptions
Unexpectedon error.

Definition at line 119 of file io_service_signal.cc.

◆ remove()

void isc::asiolink::IOSignalSet::remove ( int  signum)

Remove a signal from the list of signals to handle.

Parameters
signumSignal number.
Exceptions
Unexpectedon error.

Definition at line 124 of file io_service_signal.cc.


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