Go to the documentation of this file.
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;
163 #endif // __XRD_CL_POLLER_HH__
A network socket.
Definition: XrdClSocket.hh:42
virtual bool RemoveSocket(Socket *socket)=0
Remove the socket.
Interface for socket pollers.
Definition: XrdClPoller.hh:87
virtual bool IsRegistered(Socket *socket)=0
Check whether the socket is registered with the poller.
@ ReadTimeOut
Read timeout.
Definition: XrdClPoller.hh:42
Interface.
Definition: XrdClPoller.hh:34
virtual void Initialize(Poller *)
Initializer.
Definition: XrdClPoller.hh:55
virtual void Event(uint8_t type, Socket *socket)=0
Called when an event occurred on a given socket.
virtual bool EnableWriteNotification(Socket *socket, bool notify, uint16_t timeout=60)=0
@ ReadyToWrite
Writing won't block.
Definition: XrdClPoller.hh:43
virtual void Finalize()
Finalizer.
Definition: XrdClPoller.hh:60
static std::string EventTypeToString(uint8_t event)
Translate the event type to a string.
Definition: XrdClPoller.hh:71
virtual ~Poller()
Destructor.
Definition: XrdClPoller.hh:92
@ WriteTimeOut
Write timeout.
Definition: XrdClPoller.hh:44
virtual bool Start()=0
Start polling.
virtual ~SocketHandler()
Definition: XrdClPoller.hh:50
@ ReadyToRead
New data has arrived.
Definition: XrdClPoller.hh:41
virtual bool IsRunning() const =0
Is the event loop running?
Definition: XrdClAnyObject.hh:26
EventType
Event type.
Definition: XrdClPoller.hh:40
virtual bool Stop()=0
Stop polling.
virtual bool EnableReadNotification(Socket *socket, bool notify, uint16_t timeout=60)=0
virtual bool Finalize()=0
Finalize the poller.
virtual bool Initialize()=0
Initialize the poller.
virtual bool AddSocket(Socket *socket, SocketHandler *handler)=0