19 #ifndef __XRD_CL_ASYNC_SOCKET_HANDLER_HH__
20 #define __XRD_CL_ASYNC_SOCKET_HANDLER_HH__
53 uint16_t subStreamNum,
#define XRD_WARN_UNUSED_RESULT
Utility class encapsulating reading hand-shake response logic.
Utility class encapsulating writing hand-shake request logic.
Utility class encapsulating reading response message logic.
Utility class encapsulating writing request logic.
static std::string ToStreamName(const URL &url, uint16_t strmnb)
Convert Stream object and sub-stream number to stream name.
~AsyncSocketHandler()
Destructor.
time_t GetLastActivity()
Get timestamp of last registered socket activity.
bool OnReadTimeout() XRD_WARN_UNUSED_RESULT
std::unique_ptr< AsyncHSWriter > hswriter
virtual bool OnConnectionReturn() XRD_WARN_UNUSED_RESULT
bool OnWriteTimeout() XRD_WARN_UNUSED_RESULT
TransportHandler * pTransport
bool OnWrite() XRD_WARN_UNUSED_RESULT
bool OnTimeoutWhileHandshaking() XRD_WARN_UNUSED_RESULT
uint16_t pTimeoutResolution
bool CheckHSWait() XRD_WARN_UNUSED_RESULT
bool EventRead(uint8_t type) XRD_WARN_UNUSED_RESULT
std::unique_ptr< AsyncHSReader > hsreader
XRootDStatus DoTlsHandShake()
void OnFault(XRootDStatus st)
bool HandleHandShake(std::unique_ptr< Message > msg) XRD_WARN_UNUSED_RESULT
bool OnWriteWhileHandshaking() XRD_WARN_UNUSED_RESULT
XRootDStatus Close()
Close the connection.
time_t pConnectionTimeout
void OnFaultWhileHandshaking(XRootDStatus st)
const std::string & GetStreamName()
Get stream name.
virtual void Event(uint8_t type, XrdCl::Socket *)
Handle a socket event.
kXR_int32 HandleWaitRsp(Message *rsp)
bool HandShakeNextStep(bool done) XRD_WARN_UNUSED_RESULT
bool OnReadWhileHandshaking() XRD_WARN_UNUSED_RESULT
std::unique_ptr< AsyncMsgWriter > reqwriter
XRootDStatus EnableUplink()
Enable uplink.
std::string GetIpStack() const
Get the IP stack.
bool EventWrite(uint8_t type) XRD_WARN_UNUSED_RESULT
std::string GetHostName()
Get hostname.
std::unique_ptr< AsyncMsgReader > rspreader
XRootDStatus DisableUplink()
Disable uplink.
std::unique_ptr< HandShakeData > pHandShakeData
bool OnRead() XRD_WARN_UNUSED_RESULT
XRootDStatus Connect(time_t timeout)
Connect to the currently set address.
const XrdNetAddr & GetAddress() const
Get the address that the socket is connected to.
bool pTlsHandShakeOngoing
AsyncSocketHandler(const URL &url, Poller *poller, TransportHandler *transport, AnyObject *channelData, uint16_t subStreamNum, Stream *strm)
Constructor.
bool OnTLSHandShake() XRD_WARN_UNUSED_RESULT
time_t pConnectionStarted
void SetAddress(const XrdNetAddr &address)
Set address.
bool SendHSMsg() XRD_WARN_UNUSED_RESULT
std::string GetIpAddr()
Get IP address.
void OnHeaderCorruption()
The message representation used throughout the system.
Interface for socket pollers.
virtual bool EnableWriteNotification(Socket *socket, bool notify, uint16_t timeout=60)=0
Perform the handshake and the authentication for each physical stream.
const uint16_t stFatal
Fatal error, it's still an error.
const uint16_t errPollerError
Data structure that carries the handshake information.