25 #ifndef LOG4CPLUS_HELPERS_CONNECTORTHREAD_H
26 #define LOG4CPLUS_HELPERS_CONNECTORTHREAD_H
30 #if defined (LOG4CPLUS_HAVE_PRAGMA_ONCE)
39 #if ! defined (LOG4CPLUS_SINGLE_THREADED)
This class is used by SocketAppender and (remote) SysLogAppender to provide asynchronous re-connectio...
IConnectorThreadClient & ctc
reference to ConnectorThread's client
ConnectorThread(IConnectorThreadClient &client)
void terminate()
Call this function to terminate ConnectorThread.
thread::ManualResetEvent trigger_ev
This event is the re-connection trigger.
void trigger()
This function triggers (trigger_ev) connection check and attempt to re-connect a broken connection,...
virtual ~ConnectorThread()
bool exit_flag
When this variable set to true when ConnectorThread is signaled to.
Interface implemented by users of ConnectorThread.
virtual helpers::Socket ctcConnect()=0
virtual thread::Mutex const & ctcGetAccessMutex() const =0
virtual ~IConnectorThreadClient()
virtual helpers::Socket & ctcGetSocket()=0
virtual void ctcSetConnected()=0
Sets connected flag to true in ConnectorThread's client.
This class implements client sockets (also called just "sockets").
There are many cross-platform C++ Threading libraries.