XRootD
XrdCl::SocketHandler Class Referenceabstract

Interface. More...

#include <XrdClPoller.hh>

+ Inheritance diagram for XrdCl::SocketHandler:
+ Collaboration diagram for XrdCl::SocketHandler:

Public Types

enum  EventType {
  ReadyToRead = 0x01 ,
  ReadTimeOut = 0x02 ,
  ReadyToWrite = 0x04 ,
  WriteTimeOut = 0x08
}
 Event type. More...
 

Public Member Functions

virtual ~SocketHandler ()
 
virtual void Event (uint8_t type, Socket *socket)=0
 Called when an event occurred on a given socket. More...
 
virtual void Finalize ()
 Finalizer. More...
 
virtual void Initialize (Poller *)
 Initializer. More...
 

Static Public Member Functions

static std::string EventTypeToString (uint8_t event)
 Translate the event type to a string. More...
 

Detailed Description

Interface.

Definition at line 33 of file XrdClPoller.hh.

Member Enumeration Documentation

◆ EventType

Event type.

Enumerator
ReadyToRead 

New data has arrived.

ReadTimeOut 

Read timeout.

ReadyToWrite 

Writing won't block.

WriteTimeOut 

Write timeout.

Definition at line 39 of file XrdClPoller.hh.

40  {
41  ReadyToRead = 0x01,
42  ReadTimeOut = 0x02,
43  ReadyToWrite = 0x04,
44  WriteTimeOut = 0x08
45  };
@ ReadTimeOut
Read timeout.
Definition: XrdClPoller.hh:42
@ ReadyToWrite
Writing won't block.
Definition: XrdClPoller.hh:43
@ WriteTimeOut
Write timeout.
Definition: XrdClPoller.hh:44
@ ReadyToRead
New data has arrived.
Definition: XrdClPoller.hh:41

Constructor & Destructor Documentation

◆ ~SocketHandler()

virtual XrdCl::SocketHandler::~SocketHandler ( )
inlinevirtual

Definition at line 50 of file XrdClPoller.hh.

50 {}

Member Function Documentation

◆ Event()

virtual void XrdCl::SocketHandler::Event ( uint8_t  type,
Socket socket 
)
pure virtual

Called when an event occurred on a given socket.

Implemented in XrdCl::AsyncSocketHandler.

◆ EventTypeToString()

static std::string XrdCl::SocketHandler::EventTypeToString ( uint8_t  event)
inlinestatic

Translate the event type to a string.

Definition at line 71 of file XrdClPoller.hh.

72  {
73  std::string ev;
74  if( event & ReadyToRead ) ev += "ReadyToRead|";
75  if( event & ReadTimeOut ) ev += "ReadTimeOut|";
76  if( event & ReadyToWrite ) ev += "ReadyToWrite|";
77  if( event & WriteTimeOut ) ev += "WriteTimeOut|";
78  ev.erase( ev.length()-1, 1) ;
79  return ev;
80  }

References ReadTimeOut, ReadyToRead, ReadyToWrite, and WriteTimeOut.

◆ Finalize()

virtual void XrdCl::SocketHandler::Finalize ( )
inlinevirtual

Finalizer.

Definition at line 60 of file XrdClPoller.hh.

60 {};

◆ Initialize()

virtual void XrdCl::SocketHandler::Initialize ( Poller )
inlinevirtual

Initializer.

Definition at line 55 of file XrdClPoller.hh.

55 {}

Referenced by XrdCl::PollerBuiltIn::AddSocket().

+ Here is the caller graph for this function:

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