69 SERVERRUNNING_INVALID = 0,
70 SERVERRUNNING_NOTRUNNING,
71 SERVERRUNNING_SINGLETHREADED,
72 SERVERRUNNING_THREADPOOL,
73 SERVERRUNNING_ONETHREADPERREQUEST,
74 SERVERRUNNING_SHOULDTERMINATE
105 void IncrementRequestsPending() { m_nRequestsPending++; }
115 void HandleData_Threaded();
120 void ClearIdleConnections();
123 void CheckClientSockets();
126 void CheckAcceptSocket();
134 void RemoveFinishedConnections();
140 EHS * m_poTopLevelEHS;
143 bool m_bAcceptedNewConnection;
146 pthread_mutex_t m_oMutex;
149 pthread_cond_t m_oDoneAccepting;
152 int m_nRequestsPending;
158 std::string m_sServerName;
164 EHSConnectionList m_oEHSConnectionList;
170 ehs_threadid_t m_nAcceptThreadId;
179 CurrentRequestMap m_oCurrentRequest;
182 pthread_attr_t m_oThreadAttr;
EHSConnection abstracts the concept of a connection to an EHS application.
EHSServer contains all the network related services for EHS.
ServerRunningStatus RunningStatus() const
Retrieves the current running status of this instance.
void EndServerThread()
Stops the server.
EHSServer(EHS *ipoTopLevelEHS)
Constucts a new instance.
bool AcceptedNewConnection() const
Retrieve accept status.
ServerRunningStatus
Enumeration on the current running status of the EHSServer.
static void * PthreadHandleData_ThreadedStub(void *ipData)
Static pthread worker.
virtual ~EHSServer()
Destructor.
int RequestsPending() const
Returns number of requests pending.
void HandleData(int timeout, ehs_threadid_t tid=0)
Main method that deals with client connections and getting data.
EHS provides HTTP server functionality to a child class.
This class represents a clients HTTP request.
Abstracts different socket types.