xrootd
Public Member Functions
XrdCl::Poller Class Reference

Interface for socket pollers. More...

#include <XrdClPoller.hh>

Inheritance diagram for XrdCl::Poller:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual ~Poller ()
 Destructor.
virtual bool Initialize ()=0
 Initialize the poller.
virtual bool Finalize ()=0
 Finalize the poller.
virtual bool Start ()=0
 Start polling.
virtual bool Stop ()=0
 Stop polling.
virtual bool AddSocket (Socket *socket, SocketHandler *handler)=0
virtual bool RemoveSocket (Socket *socket)=0
 Remove the socket.
virtual bool EnableReadNotification (Socket *socket, bool notify, uint16_t timeout=60)=0
virtual bool EnableWriteNotification (Socket *socket, bool notify, uint16_t timeout=60)=0
virtual bool IsRegistered (Socket *socket)=0
 Check whether the socket is registered with the poller.
virtual bool IsRunning () const =0
 Is the event loop running?

Detailed Description

Interface for socket pollers.


Constructor & Destructor Documentation

virtual XrdCl::Poller::~Poller ( )
inlinevirtual

Destructor.


Member Function Documentation

virtual bool XrdCl::Poller::AddSocket ( Socket *  socket,
SocketHandler *  handler 
)
pure virtual

Add socket to the polling loop

Parameters:
socketthe socket
handlerobject handling the events

Implemented in XrdCl::PollerLibEvent, and XrdCl::PollerBuiltIn.

Referenced by XrdCl::AsyncSocketHandler::Connect(), and PollerTest::FunctionTest().

virtual bool XrdCl::Poller::EnableReadNotification ( Socket *  socket,
bool  notify,
uint16_t  timeout = 60 
)
pure virtual

Notify the handler about read events

Parameters:
socketthe socket
notifyspecify if the handler should be notified
timeoutif no read event occurred after this time a timeout event will be generated

Implemented in XrdCl::PollerLibEvent, and XrdCl::PollerBuiltIn.

Referenced by PollerTest::FunctionTest(), and XrdCl::AsyncSocketHandler::OnConnectionReturn().

virtual bool XrdCl::Poller::EnableWriteNotification ( Socket *  socket,
bool  notify,
uint16_t  timeout = 60 
)
pure virtual

Notify the handler about write events

Parameters:
socketthe socket
notifyspecify if the handler should be notified
timeoutif no write event occurred after this time a timeout event will be generated

Implemented in XrdCl::PollerLibEvent, and XrdCl::PollerBuiltIn.

Referenced by XrdCl::AsyncSocketHandler::Connect(), XrdCl::AsyncSocketHandler::DisableUplink(), and XrdCl::AsyncSocketHandler::EnableUplink().

virtual bool XrdCl::Poller::Finalize ( )
pure virtual

Finalize the poller.

Implemented in XrdCl::PollerLibEvent, and XrdCl::PollerBuiltIn.

Referenced by XrdCl::PostMaster::Finalize(), and PollerTest::FunctionTest().

virtual bool XrdCl::Poller::Initialize ( )
pure virtual

Initialize the poller.

Implemented in XrdCl::PollerLibEvent, and XrdCl::PollerBuiltIn.

Referenced by PollerTest::FunctionTest(), and XrdCl::PostMaster::Initialize().

virtual bool XrdCl::Poller::IsRegistered ( Socket *  socket)
pure virtual

Check whether the socket is registered with the poller.

Implemented in XrdCl::PollerLibEvent, and XrdCl::PollerBuiltIn.

Referenced by PollerTest::FunctionTest().

virtual bool XrdCl::Poller::IsRunning ( ) const
pure virtual

Is the event loop running?

Implemented in XrdCl::PollerLibEvent, and XrdCl::PollerBuiltIn.

virtual bool XrdCl::Poller::RemoveSocket ( Socket *  socket)
pure virtual
virtual bool XrdCl::Poller::Start ( )
pure virtual
virtual bool XrdCl::Poller::Stop ( )
pure virtual

The documentation for this class was generated from the following file: