|
xrootd
|
#include <XrdClAsyncSocketHandler.hh>


Public Member Functions | |
| AsyncSocketHandler (const URL &url, Poller *poller, TransportHandler *transport, AnyObject *channelData, uint16_t subStreamNum, Stream *strm) | |
| Constructor. | |
| ~AsyncSocketHandler () | |
| Destructor. | |
| void | SetAddress (const XrdNetAddr &address) |
| Set address. | |
| const XrdNetAddr & | GetAddress () const |
| Get the address that the socket is connected to. | |
| XRootDStatus | Connect (time_t timeout) |
| Connect to the currently set address. | |
| XRootDStatus | Close () |
| Close the connection. | |
| virtual void | Event (uint8_t type, XrdCl::Socket *) |
| Handle a socket event. | |
| XRootDStatus | EnableUplink () |
| Enable uplink. | |
| XRootDStatus | DisableUplink () |
| Disable uplink. | |
| const std::string & | GetStreamName () |
| Get stream name. | |
| time_t | GetLastActivity () |
| Get timestamp of last registered socket activity. | |
| std::string | GetIpStack () const |
| Get the IP stack. | |
| std::string | GetIpAddr () |
| Get IP address. | |
| std::string | GetHostName () |
| Get hostname. | |
Public Member Functions inherited from XrdCl::SocketHandler | |
| virtual | ~SocketHandler () |
| virtual void | Initialize (Poller *) |
| Initializer. | |
| virtual void | Finalize () |
| Finalizer. | |
| virtual void | Event (uint8_t type, Socket *socket)=0 |
| Called when an event occurred on a given socket. | |
Protected Member Functions | |
| virtual void | OnConnectionReturn () |
| void | OnWrite () |
| void | OnWriteWhileHandshaking () |
| void | OnRead () |
| void | OnReadWhileHandshaking () |
| void | HandleHandShake (std::unique_ptr< Message > msg) |
| void | HandShakeNextStep (bool done) |
| void | OnFault (XRootDStatus st) |
| void | OnFaultWhileHandshaking (XRootDStatus st) |
| void | OnWriteTimeout () |
| void | OnReadTimeout () |
| void | OnTimeoutWhileHandshaking () |
| void | OnHeaderCorruption () |
| XRootDStatus | DoTlsHandShake () |
| void | OnTLSHandShake () |
| void | SendHSMsg () |
| kXR_int32 | HandleWaitRsp (Message *rsp) |
| void | CheckHSWait () |
Static Protected Member Functions | |
| static std::string | ToStreamName (const URL &url, uint16_t strmnb) |
| Convert Stream object and sub-stream number to stream name. | |
Protected Attributes | |
| Poller * | pPoller |
| TransportHandler * | pTransport |
| AnyObject * | pChannelData |
| uint16_t | pSubStreamNum |
| Stream * | pStream |
| std::string | pStreamName |
| Socket * | pSocket |
| XrdNetAddr | pSockAddr |
| std::unique_ptr< HandShakeData > | pHandShakeData |
| bool | pHandShakeDone |
| uint16_t | pTimeoutResolution |
| time_t | pConnectionStarted |
| time_t | pConnectionTimeout |
| time_t | pLastActivity |
| time_t | pHSWaitStarted |
| time_t | pHSWaitSeconds |
| URL | pUrl |
| bool | pTlsHandShakeOngoing |
| std::unique_ptr< AsyncHSWriter > | hswriter |
| std::unique_ptr< AsyncMsgReader > | rspreader |
| std::unique_ptr< AsyncHSReader > | hsreader |
| std::unique_ptr< AsyncMsgWriter > | reqwriter |
Additional Inherited Members | |
Public Types inherited from XrdCl::SocketHandler | |
| enum | EventType { ReadyToRead = 0x01 , ReadTimeOut = 0x02 , ReadyToWrite = 0x04 , WriteTimeOut = 0x08 } |
| Event type. More... | |
Static Public Member Functions inherited from XrdCl::SocketHandler | |
| static std::string | EventTypeToString (uint8_t event) |
| Translate the event type to a string. | |
Utility class handling asynchronous socket interactions and forwarding events to the parent stream.
| XrdCl::AsyncSocketHandler::AsyncSocketHandler | ( | const URL & | url, |
| Poller * | poller, | ||
| TransportHandler * | transport, | ||
| AnyObject * | channelData, | ||
| uint16_t | subStreamNum, | ||
| Stream * | strm | ||
| ) |
Constructor.
| XrdCl::AsyncSocketHandler::~AsyncSocketHandler | ( | ) |
Destructor.
|
protected |
| XRootDStatus XrdCl::AsyncSocketHandler::Close | ( | ) |
Close the connection.
| XRootDStatus XrdCl::AsyncSocketHandler::Connect | ( | time_t | timeout | ) |
Connect to the currently set address.
|
inline |
Disable uplink.
References XrdCl::Poller::EnableWriteNotification(), XrdCl::errPollerError, pPoller, pSocket, and XrdCl::stFatal.
|
protected |
|
inline |
Enable uplink.
References XrdCl::Poller::EnableWriteNotification(), XrdCl::errPollerError, pPoller, pSocket, pTimeoutResolution, and XrdCl::stFatal.
|
virtual |
Handle a socket event.
Implements XrdCl::SocketHandler.
|
inline |
Get the address that the socket is connected to.
References pSockAddr.
| std::string XrdCl::AsyncSocketHandler::GetHostName | ( | ) |
Get hostname.
| std::string XrdCl::AsyncSocketHandler::GetIpAddr | ( | ) |
Get IP address.
| std::string XrdCl::AsyncSocketHandler::GetIpStack | ( | ) | const |
Get the IP stack.
|
inline |
Get timestamp of last registered socket activity.
References pLastActivity.
|
inline |
Get stream name.
References pStreamName.
|
protected |
|
protected |
|
protectedvirtual |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
inline |
Set address.
References pSockAddr.
|
staticprotected |
Convert Stream object and sub-stream number to stream name.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Referenced by GetLastActivity().
|
protected |
Referenced by DisableUplink(), and EnableUplink().
|
protected |
Referenced by GetAddress(), and SetAddress().
|
protected |
Referenced by DisableUplink(), and EnableUplink().
|
protected |
|
protected |
Referenced by GetStreamName().
|
protected |
|
protected |
Referenced by EnableUplink().
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |