class description - source file - inheritance tree

class TMonitor : public TObject

TMonitor TMonitor() TMonitor TMonitor(TMonitor&) virtual void ~TMonitor() void Activate(TSocket* sock) void ActivateAll() void Add(TSocket* sock, TMonitor::EInterest interest = kRead) 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

TList* fActive list of sockets to monitor TList* fDeActive list of (temporary) disabled sockets TSocket* fReady socket which is ready to be read public:
static const TMonitor::EInterest kRead static const TMonitor::EInterest kWrite

Class Description

 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.                            

 Create a monitor object.

 Cleanup the monitor object. Does not delete socket being monitored.

void Add(TSocket *sock, EInterest interest)
 Add socket to the monitor's active list. If interest=kRead then we
 want to monitor the socket for read readiness, if interest=kWrite
 then we monitor the socket for write readiness.

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.3 2001/01/25 18:39:42 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.