|
xrootd
|
A poller implementation using the build-in XRootD poller. More...
#include <XrdClPollerBuiltIn.hh>


Public Member Functions | |
| PollerBuiltIn () | |
| Constructor. More... | |
| virtual bool | Initialize () |
| Initialize the poller. More... | |
| virtual bool | Finalize () |
| Finalize the poller. More... | |
| virtual bool | Start () |
| Start polling. More... | |
| virtual bool | Stop () |
| Stop polling. More... | |
| virtual bool | AddSocket (Socket *socket, SocketHandler *handler) |
| virtual bool | RemoveSocket (Socket *socket) |
| Remove the socket. More... | |
| virtual bool | EnableReadNotification (Socket *socket, bool notify, uint16_t timeout=60) |
| virtual bool | EnableWriteNotification (Socket *socket, bool notify, uint16_t timeout=60) |
| virtual bool | IsRegistered (Socket *socket) |
| Check whether the socket is registered with the poller. More... | |
| virtual bool | IsRunning () const |
| Is the event loop running? More... | |
Public Member Functions inherited from XrdCl::Poller | |
| virtual | ~Poller () |
| Destructor. More... | |
Private Types | |
| typedef std::map< Socket *, void * > | SocketMap |
Private Attributes | |
| SocketMap | pSocketMap |
| XrdSys::IOEvents::Poller * | pPoller |
| XrdSysMutex | pMutex |
A poller implementation using the build-in XRootD poller.
|
private |
|
inline |
Constructor.
|
virtual |
Add socket to the polling loop
| socket | the socket |
| handler | object handling the events |
Implements XrdCl::Poller.
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(), pMutex, XrdCl::PollerMsg, pPoller, pSocketMap, 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.
References XrdCl::DefaultEnv::GetLog(), XrdCl::Socket::GetName(), pMutex, XrdCl::PollerMsg, and pSocketMap.
|
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.
References XrdCl::DefaultEnv::GetLog(), XrdCl::Socket::GetName(), pMutex, XrdCl::PollerMsg, and pSocketMap.
|
virtual |
|
virtual |
Initialize the poller.
Implements XrdCl::Poller.
|
virtual |
Check whether the socket is registered with the poller.
Implements XrdCl::Poller.
References pMutex, and pSocketMap.
|
inlinevirtual |
|
virtual |
Remove the socket.
Implements XrdCl::Poller.
References XrdCl::DefaultEnv::GetLog(), XrdCl::Socket::GetName(), pMutex, XrdCl::PollerMsg, and pSocketMap.
|
virtual |
Start polling.
Implements XrdCl::Poller.
References Create, XrdCl::DefaultEnv::GetLog(), XrdCl::PollerMsg, pPoller, and pSocketMap.
|
virtual |
Stop polling.
Implements XrdCl::Poller.
References XrdCl::Log::Debug(), XrdCl::DefaultEnv::GetLog(), XrdCl::PollerMsg, pPoller, and XrdSys::IOEvents::Poller::Stop().
|
private |
Referenced by AddSocket(), EnableReadNotification(), EnableWriteNotification(), IsRegistered(), and RemoveSocket().
|
private |
Referenced by AddSocket(), IsRunning(), Start(), and Stop().
|
private |
Referenced by AddSocket(), EnableReadNotification(), EnableWriteNotification(), Finalize(), IsRegistered(), RemoveSocket(), and Start().
1.8.3.1