TMonitor


class description - source file - inheritance tree

class TMonitor : public TObject


    public:
TMonitor TMonitor() TMonitor TMonitor(TMonitor&) virtual void ~TMonitor() void Activate(TSocket* sock) void ActivateAll() void Add(TSocket* sock) static TClass* Class() void DeActivate(TSocket* sock) void DeActivateAll() Int_t GetActive() const Int_t GetDeActive() const virtual TClass* IsA() const void Remove(TSocket* sock) void RemoveAll() TSocket* Select() TSocket* Select(Long_t timeout) void SetReady(TSocket* sock) virtual void ShowMembers(TMemberInspector& insp, char* parent) virtual void Streamer(TBuffer& b) void StreamerNVirtual(TBuffer& b)

Data Members

private:
TList* fActive list of sockets to monitor TList* fDeActive list of (temporary) disabled sockets TSocket* fReady socket which is ready to be read

Class Description

                                                                      
 TMonitor                                                             
                                                                      
 This class monitors activity on a number of network sockets.         
 The actual monitoring is done by TSystem::DispatchOneEvent().        
 Typical usage: create a TMonitor object. Register a number of        
 TSocket objects and call TMonitor::Select(). Select() returns the    
 socket object which has data waiting. TSocket objects can be added,  
 removed, (temporary) enabled or disabled.                            
                                                                      


TMonitor()
 Create a monitor object.

~TMonitor()
 Cleanup the monitor object. Does not delete socket being monitored.

void Add(TSocket *sock)
 Add socket to the monitor's active list.

void Remove(TSocket *sock)
 Remove a socket from the monitor.

void RemoveAll()
 Remove all sockets from the monitor.

void Activate(TSocket *sock)
 Activate a de-activated socket.

void ActivateAll()
 Activate all de-activated sockets.

void DeActivate(TSocket *sock)
 De-activate a socket.

void DeActivateAll()
 De-activate all activated sockets.

TSocket* Select()
 Return pointer to socket for which an event is waiting.

TSocket* Select(Long_t timeout)
 Return pointer to socket for which an event is waiting. Wait a maximum
 of timeout milliseconds. If return is due to timeout it returns
 (TSocket *)-1.

void SetReady(TSocket *sock)
 Called by TSocketHandler::Notify() to signal which socket is ready
 to be read. User should not call this routine. The ready socket will
 be returned via the Select() user function.

Int_t GetActive() const
 Return number of sockets in the active list.

Int_t GetDeActive() const
 Return number of sockets in the de-active list.



Inline Functions


            TClass* Class()
            TClass* IsA() const
               void ShowMembers(TMemberInspector& insp, char* parent)
               void Streamer(TBuffer& b)
               void StreamerNVirtual(TBuffer& b)
           TMonitor TMonitor(TMonitor&)


Author: Fons Rademakers 09/01/97
Last update: root/net:$Name: $:$Id: TMonitor.cxx,v 1.2 2000/11/27 10:46:50 rdm Exp $
Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *


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.