332 Info(
"Select",
"*** interrupt occurred ***");
363 Info(
"Select",
"*** interrupt occurred ***");
390 if (nr > 0 && (rdready || wrready)) {
400 if (rdready &&
h->IsReadReady())
401 rdready->
Add(
h->GetSocket());
402 if (wrready &&
h->IsWriteReady())
403 wrready->
Add(
h->GetSocket());
406 if (rdready &&
h->IsReadReady())
407 rdready->
Add(
h->GetSocket());
408 if (wrready &&
h->IsWriteReady())
409 wrready->
Add(
h->GetSocket());
450 Info(
"GetActive",
"socket: %p: %s:%d did not show any activity"
451 " during the last %ld millisecs: deactivating",
459 }
else if (timeout == 0) {
485 if (sock ==
h->GetSocket())
504 list->Add(
h->GetSocket());
521 list->Add(
h->GetSocket());
int Int_t
Signed integer 4 bytes (int).
long Longptr_t
Integer large enough to hold a pointer (platform-dependent).
long Long_t
Signed long integer 4 bytes (long). Size depends on architecture.
bool Bool_t
Boolean (0=false, 1=true) (bool).
#define R__ASSERT(e)
Checks condition e and reports a fatal error if it's false.
virtual void SetInterest(Int_t mask)
Set interest mask to 'mask'.
virtual Bool_t HasReadInterest()
True if handler is interested in read events.
void Remove() override
Remove file event handler from system file handler list.
virtual Bool_t HasWriteInterest()
True if handler is interested in write events.
void Add() override
Add file event handler to system file handler list.
const char * GetHostName() const
void Clear(Option_t *option="") override
Remove all objects from the list.
void Add(TObject *obj) override
friend class TTimeOutTimer
virtual void Ready(TSocket *sock)
Emit signal when some socket is ready.
void SetReady(TSocket *sock)
Called by TSocketHandler::Notify() to signal which socket is ready to be read or written.
virtual void SetInterest(TSocket *sock, Int_t interest=kRead)
Set interest mask for socket sock to interest.
virtual void RemoveAll()
Remove all sockets from the monitor.
virtual void ActivateAll()
Activate all de-activated sockets.
TSocket * Select()
Return pointer to socket for which an event is waiting.
friend class TSocketHandler
virtual void Activate(TSocket *sock)
Activate a de-activated socket.
virtual void Add(TSocket *sock, Int_t interest=kRead)
Add socket to the monitor's active list.
Int_t GetActive(Long_t timeout=-1) const
Return number of sockets in the active list.
TMonitor(Bool_t mainloop=kTRUE)
Create a monitor object.
virtual ~TMonitor()
Cleanup the monitor object. Does not delete sockets being monitored.
virtual void DeActivateAll()
De-activate all activated sockets.
virtual void DeActivate(TSocket *sock)
De-activate a socket.
TList * GetListOfActives() const
Returns a list with all active sockets.
TList * GetListOfDeActives() const
Returns a list with all de-active sockets.
virtual void Remove(TSocket *sock)
Remove a socket from the monitor.
Bool_t IsActive(TSocket *s) const
Check if socket 's' is in the active list.
Int_t GetDeActive() const
Return number of sockets in the de-active list.
TObject()
TObject constructor.
virtual void Info(const char *method, const char *msgfmt,...) const
Issue info message.
TQObject(const TQObject &)=delete
void Emit(const char *signal, const T &arg)
Activate signal with single parameter.
Bool_t ReadNotify() override
Notify when something can be read from the descriptor associated with this handler.
TSocketHandler(TMonitor *m, TSocket *s, Int_t interest, Bool_t mainloop=kTRUE)
TSocket * GetSocket() const
Bool_t Notify() override
Notify when event occurred on descriptor associated with this handler.
Bool_t WriteNotify() override
Notify when something can be written to the descriptor associated with this handler.
This class implements client sockets.
TTimeStamp GetLastUsage()
TInetAddress GetInetAddress() const
TTimeOutTimer(TMonitor *m, Long_t ms)
Bool_t Notify() override
This method must be overridden to handle object notification (the base implementation is no-op).
The TTimeStamp encapsulates seconds and ns since EPOCH.
TTimer(const TTimer &)=delete