Logo Search packages:      
Sourcecode: verlihub version File versions

nServer::cAsyncSocketServer Class Reference

#include <casyncsocketserver.h>

Inheritance diagram for nServer::cAsyncSocketServer:

cObj nDirectConnect::cServerDC

List of all members.

Detailed Description

reusable asynchronous (rather non-blocking) socket server, multi-client, general purpose
Daniel Muller

Definition at line 48 of file casyncsocketserver.h.

Public Member Functions

 cAsyncSocketServer (int port=0)
void close ()
virtual std::ostream & ErrLog ()
int ErrLog (int level)
virtual const int & getmPort ()
virtual cAsyncConnListen (int OnPort, bool UDP=false)
virtual cAsyncConnListenWithConn (cAsyncConn *, int OnPort, bool UDP=false)
virtual std::ostream & Log ()
int Log (int level)
std::ostream & LogStream ()
void OnConnClose (cAsyncConn *)
virtual int OnTimer (cTime &now)
int OnTimerBase (cTime &now)
int run ()
void SetClassName (const char *name)
virtual void setmPort (const int &_newVal)
virtual int StartListening (int OverrideDefaultPort=0)
void stop (int)
virtual bool StopListenConn (cAsyncConn *)
virtual int StrLog (std::ostream &ostr, int level)
void TimeStep ()

Static Public Member Functions

static int GetCount ()

Public Attributes

string mAddr
const char * mClassName
cMeanFrequency< unsigned,21 > mFrequency
unsigned long mMaxLineLength
int mStepDelay
cTime mTime
std::ostream * mToLog
int mUseDNS
int timer_conn_period
int timer_serv_period

Static Public Attributes

static const string mEmpty
static int msLogLevel = 4

Protected Types

typedef tConnList::iterator tCLIt
typedef list< cAsyncConn * > tConnList

Protected Member Functions

virtual void addConnection (cAsyncConn *)
virtual bool AllowNewConn ()
void delConnection (cAsyncConn *)
virtual string * FactoryString (cAsyncConn *)
virtual int input (cAsyncConn *conn)
virtual int OnNewConn (cAsyncConn *)
virtual void OnNewMessage (cAsyncConn *, string *)
int output (cAsyncConn *conn)

Protected Attributes

bool mbRun
cConnSelect mConnChooser
tConnList mConnList
cConnFactory * mFactory
int mPort
int mRunResult
sTimers mT

Static Protected Attributes

static bool WSinitialized = false

Private Attributes



class cAsyncConn


struct  sTimers
 container for connestion timers More...

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

Generated by  Doxygen 1.6.0   Back to index