xrootd
|
#include <XrdClAsyncSocketHandler.hh>
Classes | |
class | WaitTask |
Public Member Functions | |
AsyncSocketHandler (const URL &url, Poller *poller, TransportHandler *transport, AnyObject *channelData, uint16_t subStreamNum, Stream *strm) | |
Constructor. More... | |
~AsyncSocketHandler () | |
Destructor. More... | |
void | SetAddress (const XrdNetAddr &address) |
Set address. More... | |
const XrdNetAddr & | GetAddress () const |
Get the address that the socket is connected to. More... | |
XRootDStatus | Connect (time_t timeout) |
Connect to the currently set address. More... | |
XRootDStatus | Close () |
Close the connection. More... | |
virtual void | Event (uint8_t type, XrdCl::Socket *) |
Handle a socket event. More... | |
XRootDStatus | EnableUplink () |
Enable uplink. More... | |
XRootDStatus | DisableUplink () |
Disable uplink. More... | |
const std::string & | GetStreamName () |
Get stream name. More... | |
time_t | GetLastActivity () |
Get timestamp of last registered socket activity. More... | |
![]() | |
virtual | ~SocketHandler () |
virtual void | Initialize (Poller *) |
Initializer. More... | |
virtual void | Finalize () |
Finalizer. More... | |
Protected Member Functions | |
virtual void | OnConnectionReturn () |
void | OnWrite () |
void | OnWriteWhileHandshaking () |
XRootDStatus | WriteMessageAndRaw (Message *toWrite, Message *&sign) |
XRootDStatus | WriteCurrentMessage (Message *toWrite) |
void | OnRead () |
void | OnReadWhileHandshaking () |
void | HandleHandShake () |
void | HandShakeNextStep (bool done) |
XRootDStatus | ReadMessage (Message *&toRead) |
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) |
Static Protected Member Functions | |
static std::string | ToStreamName (Stream *stream, uint16_t strmnb) |
Convert Stream object and sub-stream number to stream name. More... | |
Protected Attributes | |
Poller * | pPoller |
TransportHandler * | pTransport |
AnyObject * | pChannelData |
uint16_t | pSubStreamNum |
Stream * | pStream |
std::string | pStreamName |
Socket * | pSocket |
Message * | pIncoming |
Message * | pHSIncoming |
Message * | pOutgoing |
Message * | pSignature |
XrdNetAddr | 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 |
time_t | pLastActivity |
URL | pUrl |
bool | pTlsHandShakeOngoing |
std::unique_ptr< MsgWriter > | hswriter |
Additional Inherited Members | |
![]() | |
enum | EventType { ReadyToRead = 0x01, ReadTimeOut = 0x02, ReadyToWrite = 0x04, WriteTimeOut = 0x08 } |
Event type. More... | |
![]() | |
static std::string | EventTypeToString (uint8_t event) |
Translate the event type to a string. More... | |
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.
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.
|
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 |
|
protected |
Referenced by XrdCl::AsyncSocketHandler::WaitTask::Run().
|
inline |
Set address.
References pSockAddr.
|
staticprotected |
Convert Stream object and sub-stream number to stream name.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Referenced by XrdCl::AsyncSocketHandler::WaitTask::WaitTask().
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Referenced by GetLastActivity().
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Referenced by DisableUplink(), and EnableUplink().
|
protected |
|
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 |