BazisLib::Network::GenericTCPServer Class Reference

#include <server.h>

Collaboration diagram for BazisLib::Network::GenericTCPServer:

Collaboration graph
[legend]

List of all members.

Classes

class  WorkerThread

Public Member Functions

 GenericTCPServer ()
 ~GenericTCPServer ()
bool Start (unsigned PortNumber, unsigned IP=0)
 Starts the server. If a server was already stopped, it cannot be restarted.
bool Stop (bool WaitForWorkerThreads=true)
 Stops the server. Once it is stopped, it cannot be started any more.
bool Valid ()
void WaitForTermination ()

Protected Member Functions

void WaitForWorkerThreads ()
virtual void ConnectionHandler (TCPSocket &socket)=0
 An overrideable connection handler that is called from a separate thread for each connection.

Private Attributes

TCPListener m_Listener
AtomicUInt32 m_ActiveThreadCount
Event m_LastThreadDone


Constructor & Destructor Documentation

BazisLib::Network::GenericTCPServer::GenericTCPServer (  ) 

BazisLib::Network::GenericTCPServer::~GenericTCPServer (  ) 


Member Function Documentation

virtual void BazisLib::Network::GenericTCPServer::ConnectionHandler ( TCPSocket socket  )  [protected, pure virtual]

An overrideable connection handler that is called from a separate thread for each connection.

bool BazisLib::Network::GenericTCPServer::Start ( unsigned  PortNumber,
unsigned  IP = 0 
)

Starts the server. If a server was already stopped, it cannot be restarted.

bool BazisLib::Network::GenericTCPServer::Stop ( bool  WaitForWorkerThreads = true  ) 

Stops the server. Once it is stopped, it cannot be started any more.

bool BazisLib::Network::GenericTCPServer::Valid (  )  [inline]

Here is the call graph for this function:

void BazisLib::Network::GenericTCPServer::WaitForTermination (  )  [inline]

Here is the call graph for this function:

void BazisLib::Network::GenericTCPServer::WaitForWorkerThreads (  )  [protected]


Member Data Documentation


The documentation for this class was generated from the following file:
SourceForge.net Logo