xrootd
|
XRootD transport handler. More...
#include <XrdClXRootDTransport.hh>
Public Member Functions | |
XRootDTransport () | |
Constructor. | |
~XRootDTransport () | |
Destructor. | |
virtual XRootDStatus | GetHeader (Message &message, Socket *socket) |
virtual XRootDStatus | GetBody (Message &message, Socket *socket) |
virtual XRootDStatus | GetMore (Message &message, Socket *socket) |
virtual void | InitializeChannel (const URL &url, AnyObject &channelData) |
Initialize channel. | |
virtual void | FinalizeChannel (AnyObject &channelData) |
Finalize channel. | |
virtual XRootDStatus | HandShake (HandShakeData *handShakeData, AnyObject &channelData) |
HandShake. | |
virtual bool | HandShakeDone (HandShakeData *handShakeData, AnyObject &channelData) |
virtual bool | IsStreamTTLElapsed (time_t time, AnyObject &channelData) |
Check if the stream should be disconnected. | |
virtual Status | IsStreamBroken (time_t inactiveTime, AnyObject &channelData) |
virtual PathID | Multiplex (Message *msg, AnyObject &channelData, PathID *hint=0) |
virtual PathID | MultiplexSubStream (Message *msg, AnyObject &channelData, PathID *hint=0) |
virtual uint16_t | SubStreamNumber (AnyObject &channelData) |
Return a number of substreams per stream that should be created. | |
virtual bool | NeedControlConnection () |
virtual void | Disconnect (AnyObject &channelData, uint16_t subStreamId) |
The stream has been disconnected, do the cleanups. | |
virtual Status | Query (uint16_t query, AnyObject &result, AnyObject &channelData) |
Query the channel. | |
virtual uint32_t | MessageReceived (Message &msg, uint16_t subStream, AnyObject &channelData) |
Check if the message invokes a stream action. | |
virtual void | MessageSent (Message *msg, uint16_t subStream, uint32_t bytesSent, AnyObject &channelData) |
Notify the transport about a message having been sent. | |
virtual Status | GetSignature (Message *toSign, Message *&sign, AnyObject &channelData) |
Get signature for given message. | |
virtual Status | GetSignature (Message *toSign, Message *&sign, XRootDChannelInfo *info) |
Get signature for given message. | |
virtual void | DecFileInstCnt (AnyObject &channelData) |
Decrement file object instance count bound to this channel. | |
virtual void | WaitBeforeExit () |
Wait until the program can safely exit. | |
virtual bool | NeedEncryption (HandShakeData *handShakeData, AnyObject &channelData) |
virtual URL | GetBindPreference (const URL &url, AnyObject &channelData) |
Get bind preference for the next data stream. | |
Public Member Functions inherited from XrdCl::TransportHandler | |
virtual | ~TransportHandler () |
Static Public Member Functions | |
static XRootDStatus | MarshallRequest (Message *msg) |
Marshal the outgoing message. | |
static XRootDStatus | MarshallRequest (char *msg) |
Marshal the outgoing message. | |
static XRootDStatus | UnMarshallRequest (Message *msg) |
static XRootDStatus | UnMarshallBody (Message *msg, uint16_t reqType) |
Unmarshall the body of the incoming message. | |
static XRootDStatus | UnMarshalStatusBody (Message &msg, uint16_t reqType) |
Unmarshall the body of the status response. | |
static XRootDStatus | UnMarchalStatusMore (Message &msg) |
Unmarshall the correction-segment of the status response for pgwrite. | |
static void | UnMarshallHeader (Message &msg) |
Unmarshall the header incoming message. | |
static void | LogErrorResponse (const Message &msg) |
Log server error response. | |
static uint16_t | NbConnectedStrm (AnyObject &channelData) |
Number of currently connected data streams. | |
static void | GenerateDescription (char *msg, std::ostringstream &o) |
Get the description of a message. | |
static void | SetDescription (Message *msg) |
Get the description of a message. | |
Private Member Functions | |
XRootDStatus | HandShakeMain (HandShakeData *handShakeData, AnyObject &channelData) |
XRootDStatus | HandShakeParallel (HandShakeData *handShakeData, AnyObject &channelData) |
Message * | GenerateInitialHSProtocol (HandShakeData *hsData, XRootDChannelInfo *info, kXR_char expect) |
Message * | GenerateProtocol (HandShakeData *hsData, XRootDChannelInfo *info, kXR_char expect) |
void | InitProtocolReq (ClientProtocolRequest *request, XRootDChannelInfo *info, kXR_char expect) |
XRootDStatus | ProcessServerHS (HandShakeData *hsData, XRootDChannelInfo *info) |
XRootDStatus | ProcessProtocolResp (HandShakeData *hsData, XRootDChannelInfo *info) |
XRootDStatus | ProcessProtocolBody (char *bodybuff, size_t bodysize, XRootDChannelInfo *info) |
Message * | GenerateBind (HandShakeData *hsData, XRootDChannelInfo *info) |
XRootDStatus | ProcessBindResp (HandShakeData *hsData, XRootDChannelInfo *info) |
Message * | GenerateLogIn (HandShakeData *hsData, XRootDChannelInfo *info) |
XRootDStatus | ProcessLogInResp (HandShakeData *hsData, XRootDChannelInfo *info) |
XRootDStatus | DoAuthentication (HandShakeData *hsData, XRootDChannelInfo *info) |
XRootDStatus | 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 | |
Public Types inherited from XrdCl::TransportHandler | |
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.
|
private |
|
private |
|
virtual |
Decrement file object instance count bound to this channel.
Implements XrdCl::TransportHandler.
|
virtual |
The stream has been disconnected, do the cleanups.
Implements XrdCl::TransportHandler.
|
private |
|
staticprivate |
|
virtual |
Finalize channel.
Implements XrdCl::TransportHandler.
|
private |
|
static |
Get the description of a message.
Referenced by SetDescription().
|
private |
|
private |
|
private |
|
private |
|
private |
|
virtual |
Get bind preference for the next data stream.
Implements XrdCl::TransportHandler.
|
virtual |
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 |
|
virtual |
Read a message header from the socket, the socket is non-blocking, so if there is not enough data the function should return suRetry 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 |
Read more of 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.
|
virtual |
Get signature for given message.
Implements XrdCl::TransportHandler.
|
virtual |
Get signature for given message.
|
virtual |
HandShake.
Implements XrdCl::TransportHandler.
|
virtual |
Implements XrdCl::TransportHandler.
|
private |
|
private |
|
virtual |
Initialize channel.
Implements XrdCl::TransportHandler.
|
private |
|
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.
|
static |
Marshal the outgoing message.
|
inlinestatic |
Marshal the outgoing message.
References XrdCl::Buffer::GetBuffer(), MarshallRequest(), and XrdCl::Message::SetIsMarshalled().
Referenced by MarshallRequest().
|
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
|
virtual |
Implements XrdCl::TransportHandler.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
virtual |
Query the channel.
Implements XrdCl::TransportHandler.
|
staticprivate |
|
inlinestatic |
Get the description of a message.
References GenerateDescription(), XrdCl::Buffer::GetBuffer(), and XrdCl::Message::SetDescription().
|
virtual |
Return a number of substreams per stream that should be created.
Implements XrdCl::TransportHandler.
|
static |
Unmarshall the correction-segment of the status response for pgwrite.
|
static |
Unmarshall the body of the incoming message.
|
static |
Unmarshall the header incoming message.
|
static |
Unmarshall the request - sometimes the requests need to be rewritten, so we need to unmarshall them
|
static |
Unmarshall the body of the status response.
|
virtual |
Wait until the program can safely exit.
Implements XrdCl::TransportHandler.
|
friend |
|
private |