Main Page | Class Hierarchy | Class List | File List | Class Members | Related Pages

net::ServerInterface Class Reference

Class which defines the common behaviors of the server processes. More...

#include <ServerInterface.h>

Inheritance diagram for net::ServerInterface:

net::AgentService net::ControllerService List of all members.

Public Member Functions

 ServerInterface ()
 Constructor for ServerInterface.
virtual ~ServerInterface ()
 Virtual destructor for ServerInterface.
PRThread * createThread (PRThreadType type, void(*start)(void *arg), void *arg, PRThreadPriority priority, PRThreadScope scope, PRThreadState state, PRUint32 stackSize, PRInt32 index)
virtual ResponseMessage ProcessQuery (QueryMessage)=0
 Analyzes a query and builds a response message.
int Run ()
 Checks if the client's ip address is OK then launches the server thread.
void Stop ()
 Stops the running server thread and closes the open socket.
void setSock (Socket *)
 Sets the socket for client/server communication.
int setIPAuth (string)
 sets the IP authentification file path
AccessListgetAccessList ()
 returns the AccessList object containing IP address rules

Static Public Attributes

static const int kCLIENT_QUIT_OK
static const int kWAITING_FOR_DATA
static const int kDESCRIPTOR_OK
static const int kCLIENT_IP_OK
static const int kCOMMAND_NOT_IMPLEMENTED
static const int kDESCRIPTOR_FAILED
static const int kINVALID_CLIENT_IP
static const int kINTERNAL_ERROR
static const int kBUSY

Protected Attributes

SocketmSock
PRThread * mThread
AccessListmAccessList
string mIPAuthFile

Friends

void PR_CALLBACK thread (void *)

Detailed Description

Class which defines the common behaviors of the server processes.

Author:
Laurent Moutel


Member Function Documentation

AccessList* net::ServerInterface::getAccessList  ) 
 

returns the AccessList object containing IP address rules

Returns:
the AccessList object associated to this server

virtual ResponseMessage net::ServerInterface::ProcessQuery QueryMessage   )  [pure virtual]
 

Analyzes a query and builds a response message.

Parameters:
aQueryMessage a query message to analyze
Returns:
the response we can send to the connecting process

Implemented in net::AgentService, and net::ControllerService.

int net::ServerInterface::setIPAuth string   ) 
 

sets the IP authentification file path

Parameters:
aPath The path of the file
Returns:
-1 on error, 0 on success

void net::ServerInterface::setSock Socket  ) 
 

Sets the socket for client/server communication.

Parameters:
aSocket The socket to set


Member Data Documentation

AccessList* net::ServerInterface::mAccessList [protected]
 

AccessList containing the allowed and denied hosts/networks

string net::ServerInterface::mIPAuthFile [protected]
 

Path of the IP auth file

Socket* net::ServerInterface::mSock [protected]
 

Socket on which data is received

PRThread* net::ServerInterface::mThread [protected]
 

Client handling thread


The documentation for this class was generated from the following file:
Generated on Fri May 19 23:12:37 2006 for common by  doxygen 1.4.4