25 return(
sockets_[watch_type].getSelectFd());
int getWatchFd(WatchType watch_type)
Fetches the fd of a watch socket.
void setError(const std::string &error_msg)
Sets the error state.
bool isReady(WatchType watch_type)
Indicates if a watch socket state is ready.
void start(const boost::function< void()> &thread_main)
Creates and runs the thread.
void clearReady()
Clears the socket's ready to read marker.
void markReady(WatchType watch_type)
Sets a watch socket state to ready.
thread::ThreadPtr thread_
Current thread instance.
std::string getLastError()
Fetches the error message text for the most recent error.
WatchType
Enumerates the list of watch sockets used to mark events These are used as arguments to watch socket ...
bool shouldTerminate()
Checks if the thread should terminate.
void clearReady(WatchType watch_type)
Sets a watch socket state to not ready.
void stop()
Terminates the thread.
void markReady()
Marks the select-fd as ready to read.
Defines the logger used by the top-level component of kea-dhcp-ddns.
WatchSocket sockets_[TERMINATE+1]
WatchSockets that are used to communicate with the owning thread There are three:ERROR - Marked as re...
std::string last_error_
Error message of the last error encountered.