xrootd
Public Member Functions | Private Member Functions | Private Attributes
XrdCl::AsyncSocketHandler Class Reference

#include <XrdClAsyncSocketHandler.hh>

Inheritance diagram for XrdCl::AsyncSocketHandler:
Inheritance graph
[legend]
Collaboration diagram for XrdCl::AsyncSocketHandler:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 AsyncSocketHandler (Poller *poller, TransportHandler *transport, AnyObject *channelData, uint16_t subStreamNum)
 Constructor.
 ~AsyncSocketHandler ()
 Destructor.
void SetAddress (const sockaddr_in &address)
 Set address.
const sockaddr_in & GetAddress () const
 Get the address that the socket is connected to.
Status Connect (time_t timeout)
 Connect to the currently set address.
Status Close ()
 Close the connection.
void SetStream (Stream *stream)
 Set a stream object to be notified about the status of the operations.
virtual void Event (uint8_t type, XrdCl::Socket *)
 Handle a socket event.
Status EnableUplink ()
 Enable uplink.
Status DisableUplink ()
 Disable uplink.
const std::string & GetStreamName ()
 Get stream name.

Private Member Functions

void OnConnectionReturn ()
void OnWrite ()
void OnWriteWhileHandshaking ()
Status WriteCurrentMessage ()
void OnRead ()
void OnReadWhileHandshaking ()
Status ReadMessage ()
void OnFault (Status st)
void OnFaultWhileHandshaking (Status st)
void OnWriteTimeout ()
void OnReadTimeout ()
void OnTimeoutWhileHandshaking ()

Private Attributes

Poller * pPoller
TransportHandler * pTransport
AnyObject * pChannelData
uint16_t pSubStreamNum
Stream * pStream
std::string pStreamName
Socket * pSocket
Message * pIncoming
Message * pOutgoing
sockaddr_in pSockAddr
HandShakeData * pHandShakeData
bool pHandShakeDone
uint16_t pTimeoutResolution
time_t pConnectionStarted
time_t pConnectionTimeout
bool pHeaderDone
std::pair< IncomingMsgHandler
*, bool > 
pIncHandler
bool pOutMsgDone
OutgoingMsgHandler * pOutHandler
uint32_t pIncMsgSize
uint32_t pOutMsgSize

Detailed Description

Utility class handling asynchronous socket interactions and forwarding events to the parent stream.


Constructor & Destructor Documentation

XrdCl::AsyncSocketHandler::AsyncSocketHandler ( Poller *  poller,
TransportHandler *  transport,
AnyObject *  channelData,
uint16_t  subStreamNum 
)

Destructor.

References Close(), and pSocket.


Member Function Documentation

void XrdCl::AsyncSocketHandler::Event ( uint8_t  type,
XrdCl::Socket *   
) [virtual]
const sockaddr_in& XrdCl::AsyncSocketHandler::GetAddress ( ) const [inline]

Get the address that the socket is connected to.

References pSockAddr.

const std::string& XrdCl::AsyncSocketHandler::GetStreamName ( ) [inline]

Get stream name.

References pStreamName.

References XrdCl::Stream::OnReadTimeout(), pStream, and pSubStreamNum.

Referenced by Event().

void XrdCl::AsyncSocketHandler::SetAddress ( const sockaddr_in &  address) [inline]

Set address.

References pSockAddr.

Set a stream object to be notified about the status of the operations.

References XrdCl::URL::GetHostId(), XrdCl::Stream::GetStreamNumber(), XrdCl::Stream::GetURL(), pStream, pStreamName, pSubStreamNum, and PC3::stream().

Referenced by XrdCl::Stream::Initialize(), and XrdCl::Stream::OnConnect().


Member Data Documentation

Referenced by OnRead(), and ReadMessage().

Referenced by AsyncSocketHandler(), OnFault(), and OnRead().

Referenced by OnRead().

Referenced by OnFault(), and OnWrite().

Referenced by OnWrite().

Referenced by OnWrite().

sockaddr_in XrdCl::AsyncSocketHandler::pSockAddr [private]

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