19#ifndef __XRD_CL_POLLER_HH__
20#define __XRD_CL_POLLER_HH__
65 virtual void Event( uint8_t type,
78 ev.erase( ev.length()-1, 1) ;
138 uint16_t timeout = 60 ) = 0;
149 uint16_t timeout = 60 ) = 0;
Interface for socket pollers.
Definition XrdClPoller.hh:87
virtual bool Start()=0
Start polling.
virtual bool IsRunning() const =0
Is the event loop running?
virtual bool Finalize()=0
Finalize the poller.
virtual ~Poller()
Destructor.
Definition XrdClPoller.hh:92
virtual bool EnableReadNotification(Socket *socket, bool notify, uint16_t timeout=60)=0
virtual bool EnableWriteNotification(Socket *socket, bool notify, uint16_t timeout=60)=0
virtual bool AddSocket(Socket *socket, SocketHandler *handler)=0
virtual bool RemoveSocket(Socket *socket)=0
Remove the socket.
virtual bool Initialize()=0
Initialize the poller.
virtual bool IsRegistered(Socket *socket)=0
Check whether the socket is registered with the poller.
virtual bool Stop()=0
Stop polling.
Interface.
Definition XrdClPoller.hh:34
virtual ~SocketHandler()
Definition XrdClPoller.hh:50
virtual void Finalize()
Finalizer.
Definition XrdClPoller.hh:60
virtual void Event(uint8_t type, Socket *socket)=0
Called when an event occurred on a given socket.
EventType
Event type.
Definition XrdClPoller.hh:40
@ ReadTimeOut
Read timeout.
Definition XrdClPoller.hh:42
@ ReadyToWrite
Writing won't block.
Definition XrdClPoller.hh:43
@ WriteTimeOut
Write timeout.
Definition XrdClPoller.hh:44
@ ReadyToRead
New data has arrived.
Definition XrdClPoller.hh:41
static std::string EventTypeToString(uint8_t event)
Translate the event type to a string.
Definition XrdClPoller.hh:71
virtual void Initialize(Poller *)
Initializer.
Definition XrdClPoller.hh:55
A network socket.
Definition XrdClSocket.hh:43
Definition XrdClAction.hh:34