xrootd
|
XRootD transport handler. More...
#include <XrdClXRootDTransport.hh>
Public Member Functions | |
XRootDTransport () | |
Constructor. More... | |
~XRootDTransport () | |
Destructor. More... | |
virtual Status | GetHeader (Message *message, int socket) |
virtual Status | GetBody (Message *message, int socket) |
virtual void | InitializeChannel (AnyObject &channelData) |
Initialize channel. More... | |
virtual void | InitializeChannel (const URL &url, AnyObject &channelData) |
virtual void | FinalizeChannel (AnyObject &channelData) |
Finalize channel. More... | |
virtual Status | HandShake (HandShakeData *handShakeData, AnyObject &channelData) |
HandShake. More... | |
virtual bool | IsStreamTTLElapsed (time_t time, uint16_t streamId, AnyObject &channelData) |
Check if the stream should be disconnected. More... | |
virtual Status | IsStreamBroken (time_t inactiveTime, uint16_t streamId, AnyObject &channelData) |
virtual PathID | Multiplex (Message *msg, AnyObject &channelData, PathID *hint=0) |
virtual PathID | MultiplexSubStream (Message *msg, uint16_t streamId, AnyObject &channelData, PathID *hint=0) |
virtual uint16_t | StreamNumber (AnyObject &channelData) |
Return a number of streams that should be created. More... | |
virtual uint16_t | SubStreamNumber (AnyObject &channelData) |
Return a number of substreams per stream that should be created. More... | |
virtual bool | NeedControlConnection () |
virtual void | Disconnect (AnyObject &channelData, uint16_t streamId, uint16_t subStreamId) |
The stream has been disconnected, do the cleanups. More... | |
virtual Status | Query (uint16_t query, AnyObject &result, AnyObject &channelData) |
Query the channel. More... | |
virtual uint32_t | MessageReceived (Message *msg, uint16_t streamId, uint16_t subStream, AnyObject &channelData) |
Check if the message invokes a stream action. More... | |
virtual void | MessageSent (Message *msg, uint16_t streamId, uint16_t subStream, uint32_t bytesSent, AnyObject &channelData) |
Notify the transport about a message having been sent. More... | |
virtual Status | GetSignature (Message *toSign, Message *&sign, AnyObject &channelData) |
Get signature for given message. More... | |
Status | GetSignature (Message *toSign, Message *&sign, XRootDChannelInfo *info) |
Get signature for given message. More... | |
Status | ClassifyErrno (int error) |
Classify errno while reading/writing. More... | |
![]() | |
virtual | ~TransportHandler () |
Static Public Member Functions | |
static Status | MarshallRequest (Message *msg) |
Marshal the outgoing message. More... | |
static Status | UnMarshallRequest (Message *msg) |
static Status | UnMarshallBody (Message *msg, uint16_t reqType) |
Unmarshall the body of the incoming message. More... | |
static void | UnMarshallHeader (Message *msg) |
Unmarshall the header incoming message. More... | |
static void | LogErrorResponse (const Message &msg) |
Log server error response. More... | |
static uint16_t | NbConnectedStrm (AnyObject &channelData) |
Number of currently connected data streams. More... | |
static void | SetDescription (Message *msg) |
Get the description of a message. More... | |
Private Member Functions | |
Status | HandShakeMain (HandShakeData *handShakeData, AnyObject &channelData) |
Status | HandShakeParallel (HandShakeData *handShakeData, AnyObject &channelData) |
Message * | GenerateInitialHS (HandShakeData *hsData, XRootDChannelInfo *info) |
Message * | GenerateInitialHSProtocol (HandShakeData *hsData, XRootDChannelInfo *info) |
Status | ProcessServerHS (HandShakeData *hsData, XRootDChannelInfo *info) |
Status | ProcessProtocolResp (HandShakeData *hsData, XRootDChannelInfo *info) |
Message * | GenerateBind (HandShakeData *hsData, XRootDChannelInfo *info) |
Status | ProcessBindResp (HandShakeData *hsData, XRootDChannelInfo *info) |
Message * | GenerateLogIn (HandShakeData *hsData, XRootDChannelInfo *info) |
Status | ProcessLogInResp (HandShakeData *hsData, XRootDChannelInfo *info) |
Status | DoAuthentication (HandShakeData *hsData, XRootDChannelInfo *info) |
Status | GetCredentials (XrdSecCredentials *&credentials, HandShakeData *hsData, XRootDChannelInfo *info) |
Status | CleanUpAuthentication (XRootDChannelInfo *info) |
Status | CleanUpProtection (XRootDChannelInfo *info) |
XrdSecGetProt_t | GetAuthHandler () |
Message * | GenerateEndSession (HandShakeData *hsData, XRootDChannelInfo *info) |
Status | ProcessEndSessionResp (HandShakeData *hsData, XRootDChannelInfo *info) |
Static Private Member Functions | |
static std::string | ServerFlagsToStr (uint32_t flags) |
static std::string | FileHandleToStr (const unsigned char handle[4]) |
Private Attributes | |
PluginUnloadHandler * | pSecUnloadHandler |
Friends | |
struct | PluginUnloadHandler |
Additional Inherited Members | |
![]() | |
enum | StreamAction { NoAction = 0x0000, DigestMsg = 0x0001, AbortStream = 0x0002, CloseStream = 0x0004, ResumeStream = 0x0008, HoldStream = 0x0010, RequestClose = 0x0020 } |
Stream actions that may be triggered by incoming control messages. More... | |
XRootD transport handler.
XrdCl::XRootDTransport::XRootDTransport | ( | ) |
Constructor.
XrdCl::XRootDTransport::~XRootDTransport | ( | ) |
Destructor.
Status XrdCl::XRootDTransport::ClassifyErrno | ( | int | error | ) |
Classify errno while reading/writing.
|
private |
|
private |
|
virtual |
The stream has been disconnected, do the cleanups.
Implements XrdCl::TransportHandler.
|
private |
|
staticprivate |
|
virtual |
Finalize channel.
Implements XrdCl::TransportHandler.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
Read the message body from the socket, the socket is non-blocking, the method may be called multiple times - see GetHeader for details
message | the message buffer containing the header |
socket | the socket |
Implements XrdCl::TransportHandler.
|
private |
Read a message header from the socket, the socket is non-blocking, so if there is not enough data the function should return errRetry in which case it will be called again when more data arrives, with the data previously read stored in the message buffer
message | the message buffer |
socket | the socket |
Implements XrdCl::TransportHandler.
|
virtual |
Get signature for given message.
Status XrdCl::XRootDTransport::GetSignature | ( | Message * | toSign, |
Message *& | sign, | ||
XRootDChannelInfo * | info | ||
) |
Get signature for given message.
|
virtual |
HandShake.
Implements XrdCl::TransportHandler.
|
private |
|
private |
|
virtual |
Initialize channel.
Implements XrdCl::TransportHandler.
|
virtual |
|
virtual |
Check the stream is broken - ie. TCP connection got broken and went undetected by the TCP stack
Implements XrdCl::TransportHandler.
|
virtual |
Check if the stream should be disconnected.
Implements XrdCl::TransportHandler.
|
static |
Log server error response.
Marshal the outgoing message.
|
virtual |
Check if the message invokes a stream action.
Implements XrdCl::TransportHandler.
|
virtual |
Notify the transport about a message having been sent.
Implements XrdCl::TransportHandler.
|
virtual |
Return the ID for the up stream this message should be sent by and the down stream which the answer should be expected at. Modify the message itself if necessary. If hint is non-zero then the message should be modified such that the answer will be returned via the hinted stream.
Implements XrdCl::TransportHandler.
|
virtual |
Return the ID for the up substream this message should be sent by and the down substream which the answer should be expected at. Modify the message itself if necessary. If hint is non-zero then the message should be modified such that the answer will be returned via the hinted stream.
Implements XrdCl::TransportHandler.
|
static |
Number of currently connected data streams.
|
inlinevirtual |
Return the information whether a control connection needs to be valid before establishing other connections
|
private |
|
private |
|
private |
|
private |
|
private |
|
virtual |
Query the channel.
Implements XrdCl::TransportHandler.
|
staticprivate |
|
static |
Get the description of a message.
|
virtual |
Return a number of streams that should be created.
Implements XrdCl::TransportHandler.
|
virtual |
Return a number of substreams per stream that should be created.
Implements XrdCl::TransportHandler.
Unmarshall the body of the incoming message.
|
static |
Unmarshall the header incoming message.
Unmarshall the request - sometimes the requests need to be rewritten, so we need to unmarshall them
|
friend |
|
private |