TLServer
class description - source file - inheritance tree
class TLServer : public TServerSocket
private:
TSocket* Connect(TSocket* s, TLServer* inst)
static void Thread_func(void* arg)
void Thread_stop(int num = -1)
public:
TLServer TLServer(const Int_t port, Bool_t reuse = kTRUE, const UInt_t maxmess = 10)
virtual void ~TLServer()
static TClass* Class()
virtual TClass* IsA() const
void Listen()
virtual void ShowMembers(TMemberInspector& insp, char* parent)
virtual void Streamer(TBuffer& b)
void StreamerNVirtual(TBuffer& b)
private:
TSocket* fSocket[4] main sockets
TSocket* fASocket[3] monitoring sockets
TSocket* fS current socket
TMonitor* fMon
TMessage* fMess
queue<TMessage*> fMessQueue[8][8] message queue
Bool_t fWaitingClient[8][8] flags for reading clients
UInt_t fNMaxMess Maximum number of messages in each queue
TThread* pmThread[8] pointer to thread
TLServer(const Int_t port, Bool_t reuse, const UInt_t maxmess)
: TServerSocket(port,reuse)
for port and reuse see TServerSocket Class
~TLServer()
void Thread_stop(int num)
stop thread number num
if no number is set, then stop all threads!
void Thread_func(void* arg)
This function is called with each new thread - with each new connection
First the connection in fS is accepted
there are two types of clients those normal and those who connect
with TLClient(const ELClientTypes elc=kLC_AMAX). For the last type
the free socket is found and the connection is accepted.
See TLServer::Connect() for how the kLC_AMAX clients are connected.
TSocket* Connect(TSocket* fs,TLServer* inst)
the connection of socket fs is accepted if the appropriate
communication and ELClientType is avalable.
Thread must be locked!!!
void Listen()
Listen for a connection. For each connection starts new thread
if there are many connections, which only want to do bad, then
this method is not good. Connection is not accepted here! Only the
socket is stored in fS.
Number of threads is equal to the size of LClientType enum.
With each new thread the Thread_func() is started. Then the
listening to this client is deactivated, to avoid starting
new thread for each message.
Thread pointers are stored in pmThread pointer array.
See Thread_func() for more informations...
Inline Functions
TClass* Class()
TClass* IsA() const
void ShowMembers(TMemberInspector& insp, char* parent)
void Streamer(TBuffer& b)
void StreamerNVirtual(TBuffer& b)
Last update: Sat Oct 16 19:10:26 2004
ROOT page - Class index - Top of the page
This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.