![]() |
XRootD
|
A poller implementation using the build-in XRootD poller. More...
#include <XrdClPollerBuiltIn.hh>
Public Member Functions | |
PollerBuiltIn () | |
Constructor. | |
~PollerBuiltIn () | |
virtual bool | AddSocket (Socket *socket, SocketHandler *handler) |
virtual bool | EnableReadNotification (Socket *socket, bool notify, uint16_t timeout=60) |
virtual bool | EnableWriteNotification (Socket *socket, bool notify, uint16_t timeout=60) |
virtual bool | Finalize () |
Finalize the poller. | |
virtual bool | Initialize () |
Initialize the poller. | |
virtual bool | IsRegistered (Socket *socket) |
Check whether the socket is registered with the poller. | |
virtual bool | IsRunning () const |
Is the event loop running? | |
virtual bool | RemoveSocket (Socket *socket) |
Remove the socket. | |
virtual bool | Start () |
Start polling. | |
virtual bool | Stop () |
Stop polling. | |
![]() | |
virtual | ~Poller () |
Destructor. | |
A poller implementation using the build-in XRootD poller.
Definition at line 40 of file XrdClPollerBuiltIn.hh.
|
inline |
Constructor.
Definition at line 46 of file XrdClPollerBuiltIn.hh.
|
inline |
Definition at line 48 of file XrdClPollerBuiltIn.hh.
|
virtual |
Add socket to the polling loop
socket | the socket |
handler | object handling the events |
Implements XrdCl::Poller.
Definition at line 253 of file XrdClPollerBuiltIn.cc.
References XrdCl::Socket::Connected, XrdCl::Socket::Connecting, XrdCl::Log::Debug(), XrdCl::Log::Error(), XrdCl::Socket::GetFD(), XrdCl::DefaultEnv::GetLog(), XrdCl::Socket::GetName(), XrdCl::Socket::GetStatus(), XrdCl::SocketHandler::Initialize(), XrdCl::PollerMsg, and XrdCl::Log::Warning().
|
virtual |
Notify the handler about read events
socket | the socket |
notify | specify if the handler should be notified |
timeout | if no read event occurred after this time a timeout event will be generated |
Implements XrdCl::Poller.
Definition at line 354 of file XrdClPollerBuiltIn.cc.
References XrdCl::Log::Dump(), XrdCl::Log::Error(), XrdCl::DefaultEnv::GetLog(), XrdCl::Socket::GetName(), XrdCl::PollerMsg, and XrdCl::Log::Warning().
|
virtual |
Notify the handler about write events
socket | the socket |
notify | specify if the handler should be notified |
timeout | if no write event occurred after this time a timeout event will be generated |
Implements XrdCl::Poller.
Definition at line 439 of file XrdClPollerBuiltIn.cc.
References XrdCl::Log::Dump(), XrdCl::Log::Error(), XrdCl::DefaultEnv::GetLog(), XrdCl::Socket::GetName(), XrdCl::PollerMsg, and XrdCl::Log::Warning().
|
virtual |
Finalize the poller.
Implements XrdCl::Poller.
Definition at line 106 of file XrdClPollerBuiltIn.cc.
|
virtual |
Initialize the poller.
Implements XrdCl::Poller.
Definition at line 98 of file XrdClPollerBuiltIn.cc.
|
virtual |
Check whether the socket is registered with the poller.
Implements XrdCl::Poller.
Definition at line 524 of file XrdClPollerBuiltIn.cc.
|
inlinevirtual |
Is the event loop running?
Implements XrdCl::Poller.
Definition at line 117 of file XrdClPollerBuiltIn.hh.
|
virtual |
Remove the socket.
Implements XrdCl::Poller.
Definition at line 308 of file XrdClPollerBuiltIn.cc.
References XrdCl::Log::Debug(), XrdCl::Log::Error(), XrdCl::DefaultEnv::GetLog(), XrdCl::Socket::GetName(), XrdCl::PollerMsg, and XrdSysMutexHelper::UnLock().
|
virtual |
Start polling.
Implements XrdCl::Poller.
Definition at line 127 of file XrdClPollerBuiltIn.cc.
References XrdCl::Log::Debug(), XrdCl::Log::Error(), XrdCl::Socket::GetFD(), XrdCl::DefaultEnv::GetLog(), XrdCl::PollerMsg, and XrdSysE2T().
|
virtual |
Stop polling.
Implements XrdCl::Poller.
Definition at line 199 of file XrdClPollerBuiltIn.cc.
References XrdCl::Log::Debug(), XrdCl::Log::Error(), XrdCl::DefaultEnv::GetLog(), XrdCl::Socket::GetName(), XrdSysMutexHelper::Lock(), XrdCl::PollerMsg, XrdSys::IOEvents::Poller::Stop(), and XrdSysMutexHelper::UnLock().