65 void HandleData(
int timeout, ehs_threadid_t tid = 0);
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;
187 #endif // _EHSSERVER_H_ EHSServer contains all the network related services for EHS.
EHS provides HTTP server functionality to a child class.
EHSConnection abstracts the concept of a connection to an EHS application.
ServerRunningStatus RunningStatus() const
Retrieves the current running status of this instance.
virtual ~EHSServer()
Destructor.
int RequestsPending() const
Returns number of requests pending.
void EndServerThread()
Stops the server.
bool AcceptedNewConnection() const
Retrieve accept status.
This class represents a clients HTTP request.
void HandleData(int timeout, ehs_threadid_t tid=0)
Main method that deals with client connections and getting data.
static void * PthreadHandleData_ThreadedStub(void *ipData)
Static pthread worker.
ServerRunningStatus
Enumeration on the current running status of the EHSServer.
Abstracts different socket types.