19 #ifndef __XRD_CL_POLLER_BUILT_IN_HH__
20 #define __XRD_CL_POLLER_BUILT_IN_HH__
28 namespace XrdSys {
namespace IOEvents
95 uint16_t timeout = 60 );
107 uint16_t timeout = 60);
119 return !pPollerPool.empty();
137 void UnregisterFromPoller(
const Socket *socket);
147 static int GetNbPollerInit();
150 typedef std::map<const AnyObject *, std::pair<XrdSys::IOEvents::Poller *, size_t> > PollerMap;
152 typedef std::map<Socket *, void *> SocketMap;
153 typedef std::vector<XrdSys::IOEvents::Poller *> PollerPool;
155 SocketMap pSocketMap;
156 PollerMap pPollerMap;
157 PollerPool pPollerPool;
158 PollerPool::iterator pNext;
A poller implementation using the build-in XRootD poller.
virtual bool EnableWriteNotification(Socket *socket, bool notify, uint16_t timeout=60)
virtual bool AddSocket(Socket *socket, SocketHandler *handler)
virtual bool RemoveSocket(Socket *socket)
Remove the socket.
virtual bool EnableReadNotification(Socket *socket, bool notify, uint16_t timeout=60)
virtual bool Stop()
Stop polling.
virtual bool IsRegistered(Socket *socket)
Check whether the socket is registered with the poller.
virtual bool Finalize()
Finalize the poller.
virtual bool Initialize()
Initialize the poller.
PollerBuiltIn()
Constructor.
virtual bool IsRunning() const
Is the event loop running?
virtual bool Start()
Start polling.
Interface for socket pollers.