ABA_MTSERVER Class Reference

class ABA_MTSERVER is an abstract base class of a multithreaded server, which listens on a port for messages of type ABA_MESSAGE. The pure virtual function svcMessage must be defined in a subclass. More...

#include <mtserver.h>

Inheritance diagram for ABA_MTSERVER:

ABA_ABACUSROOT ABA_SUBSERVER List of all members.

Protected Member Functions

virtual bool svcMessage (ABA_MESSAGE &msg)=0
 The pure virtual function svcMessage has to be defined in a subclass.

Protected Attributes

ABA_MASTERmaster_
int port_
int nThreads_
ACE_SOCK_Acceptor acceptor_

Private Member Functions

public ABA_MTSERVER (ABA_MASTER *master, int port, int nThreads)
 ~ABA_MTSERVER ()
 The destructor.
int open (void *)
int close (u_long)
int svc ()

Detailed Description

class ABA_MTSERVER is an abstract base class of a multithreaded server, which listens on a port for messages of type ABA_MESSAGE. The pure virtual function svcMessage must be defined in a subclass.

Definition at line 47 of file mtserver.h.


Constructor & Destructor Documentation

public ABA_MTSERVER::ABA_MTSERVER ( ABA_MASTER master,
int  port,
int  nThreads 
) [private]

The constructor.

Parameters:
master A pointer to the master object.
port The port number on which the server is listening.
nThreads The number of threads.

ABA_MTSERVER::~ABA_MTSERVER (  )  [private]

The destructor.


Member Function Documentation

int ABA_MTSERVER::open ( void *   )  [private]

This function begins listening for connections on port_. nThreads_ new threads are started which all will all accept connections on this port.

int ABA_MTSERVER::close ( u_long   )  [inline, private]

Definition at line 88 of file mtserver.h.

int ABA_MTSERVER::svc (  )  [private]

The entry point of all threads.

virtual bool ABA_MTSERVER::svcMessage ( ABA_MESSAGE msg  )  [protected, pure virtual]

The pure virtual function svcMessage has to be defined in a subclass.

This function must receive the message and service the connection. When this function returns the connection will be closed.

Implemented in ABA_SUBSERVER.


Member Data Documentation

ABA_MASTER* ABA_MTSERVER::master_ [protected]

Definition at line 73 of file mtserver.h.

int ABA_MTSERVER::port_ [protected]

Definition at line 74 of file mtserver.h.

int ABA_MTSERVER::nThreads_ [protected]

Definition at line 75 of file mtserver.h.

ACE_SOCK_Acceptor ABA_MTSERVER::acceptor_ [protected]

Definition at line 76 of file mtserver.h.


The documentation for this class was generated from the following file:
Generated on Tue Aug 14 18:09:58 2007 for ABACUS by  doxygen 1.5.1