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);
150 typedef std::map<const AnyObject *, std::pair<XrdSys::IOEvents::Poller *, size_t> >
PollerMap;
164 #endif // __XRD_CL_POLLER_BUILT_IN_HH__
std::map< Socket *, void * > SocketMap
Definition: XrdClPollerBuiltIn.hh:152
const int pNbPoller
Definition: XrdClPollerBuiltIn.hh:159
A poller implementation using the build-in XRootD poller.
Definition: XrdClPollerBuiltIn.hh:40
Interface.
Definition: XrdClPoller.hh:33
Interface for socket pollers.
Definition: XrdClPoller.hh:86
std::map< const AnyObject *, std::pair< XrdSys::IOEvents::Poller *, size_t > > PollerMap
Definition: XrdClPollerBuiltIn.hh:150
~PollerBuiltIn()
Definition: XrdClPollerBuiltIn.hh:48
virtual bool EnableReadNotification(Socket *socket, bool notify, uint16_t timeout=60)
virtual bool Initialize()
Initialize the poller.
PollerBuiltIn()
Constructor.
Definition: XrdClPollerBuiltIn.hh:46
std::vector< XrdSys::IOEvents::Poller * > PollerPool
Definition: XrdClPollerBuiltIn.hh:153
PollerPool::iterator pNext
Definition: XrdClPollerBuiltIn.hh:158
XrdSys::IOEvents::Poller * GetNextPoller()
Goes over poller threads in round robin fashion.
virtual bool AddSocket(Socket *socket, SocketHandler *handler)
XrdSysMutex pMutex
Definition: XrdClPollerBuiltIn.hh:160
virtual bool IsRegistered(Socket *socket)
Check whether the socket is registered with the poller.
virtual bool IsRunning() const
Is the event loop running?
Definition: XrdClPollerBuiltIn.hh:117
Definition: XrdSysPthread.hh:164
virtual bool EnableWriteNotification(Socket *socket, bool notify, uint16_t timeout=60)
XrdSys::IOEvents::Poller * RegisterAndGetPoller(const Socket *socket)
Registers given socket as a poller user and returns the poller object.
PollerPool pPollerPool
Definition: XrdClPollerBuiltIn.hh:157
Definition: XrdSysIOEvents.hh:371
PollerMap pPollerMap
Definition: XrdClPollerBuiltIn.hh:156
static int GetNbPollerInit()
Gets the initial value for 'pNbPoller'.
virtual bool Start()
Start polling.
virtual bool RemoveSocket(Socket *socket)
Remove the socket.
XrdSys::IOEvents::Poller * GetPoller(const Socket *socket)
Returns the poller object associated with the given socket.
virtual bool Stop()
Stop polling.
SocketMap pSocketMap
Definition: XrdClPollerBuiltIn.hh:155
void UnregisterFromPoller(const Socket *socket)
Unregisters given socket from poller object.
virtual bool Finalize()
Finalize the poller.
A network socket.
Definition: XrdClSocket.hh:42