EHS Embedded HTTP Server  1.5.0.132
EHSServer Class Reference

EHSServer contains all the network related services for EHS. More...

#include <ehsserver.h>

List of all members.

Public Types

enum  ServerRunningStatus {
  SERVERRUNNING_INVALID = 0,
  SERVERRUNNING_NOTRUNNING,
  SERVERRUNNING_SINGLETHREADED,
  SERVERRUNNING_THREADPOOL,
  SERVERRUNNING_ONETHREADPERREQUEST,
  SERVERRUNNING_SHOULDTERMINATE
}
 Enumeration on the current running status of the EHSServer.

Public Member Functions

 EHSServer (EHS *ipoTopLevelEHS)
 Constucts a new instance.
virtual ~EHSServer ()
 Destructor.
void EndServerThread ()
 Stops the server.
void HandleData (int timeout, ehs_threadid_t tid=0)
 Main method that deals with client connections and getting data.
ServerRunningStatus RunningStatus () const
 Retrieves the current running status of this instance.
bool AcceptedNewConnection () const
 Retrieve accept status.
int RequestsPending () const
 Returns number of requests pending.

Static Public Member Functions

static void * PthreadHandleData_ThreadedStub (void *ipData)
 Static pthread worker.

Friends

class EHSConnection

Detailed Description

EHSServer contains all the network related services for EHS.

It is responsible for accepting new connections and getting EHSConnection objects set up.


Constructor & Destructor Documentation

EHSServer ( EHS ipoTopLevelEHS)

Constucts a new instance.

Takes parameters out of the parent's EHSServerParameters.

Parameters:
ipoTopLevelEHSThe parent EHS instance.

Member Function Documentation

bool AcceptedNewConnection ( ) const [inline]

Retrieve accept status.

Returns:
true if this instance just has accepted a new connection.

Definition at line 87 of file ehsserver.h.

void EndServerThread ( )

Stops the server.

This method blocks, until all server threads have terminated.

void HandleData ( int  timeout,
ehs_threadid_t  tid = 0 
)

Main method that deals with client connections and getting data.

Parameters:
timeoutselect timeout in milliseconds.
tidThread Id of the thread calling this method.
static void* PthreadHandleData_ThreadedStub ( void *  ipData) [static]

Static pthread worker.

Required by pthread as thread routine.

Parameters:
ipDataOpaque pointer to this instance.
ServerRunningStatus RunningStatus ( ) const [inline]

Retrieves the current running status of this instance.

Returns:
The current status.

Definition at line 81 of file ehsserver.h.


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