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