25 #ifndef __XRD_CL_POST_MASTER_INTERFACES_HH__
26 #define __XRD_CL_POST_MASTER_INTERFACES_HH__
99 virtual uint16_t
Examine( std::shared_ptr<Message> &msg ) = 0;
140 uint32_t &bytesRead )
142 (void)msg; (void)socket; (void)bytesRead;
156 (void)event; (void)status;
184 virtual bool IsRaw()
const {
return false; }
197 uint32_t &bytesWritten )
199 (void)socket; (void)bytesWritten;
281 static const uint16_t
Name = 1;
282 static const uint16_t
Auth = 2;
442 uint16_t subStreamId ) = 0;
virtual bool OnChannelEvent(ChannelEvent event, Status status)=0
ChannelEvent
Events that may have occurred to the channel.
@ StreamBroken
The stream is broken.
@ StreamReady
The stream has become connected.
@ FatalError
Stream has been broken and won't be recovered.
virtual ~ChannelEventHandler()
Destructor.
The message representation used throughout the system.
virtual ~MsgHandler()
Event types that the message handler may receive.
virtual uint16_t Examine(std::shared_ptr< Message > &msg)=0
virtual XRootDStatus ReadMessageBody(Message *msg, Socket *socket, uint32_t &bytesRead)
virtual XRootDStatus WriteMessageBody(Socket *socket, uint32_t &bytesWritten)
virtual uint16_t GetSid() const =0
Action
Actions to be taken after a message is processed by the handler.
@ More
there are more (non-raw) data to be read
@ Ignore
Ignore the message.
virtual void OnReadyToSend(Message *msg)
virtual uint8_t OnStreamEvent(StreamEvent event, XRootDStatus status)
virtual time_t GetExpiration()=0
StreamEvent
Events that may have occurred to the stream.
@ FatalError
Stream has been broken and won't be recovered.
@ Ready
The stream has become connected.
@ Broken
The stream is broken.
virtual uint16_t InspectStatusRsp()=0
virtual void OnStatusReady(const Message *message, XRootDStatus status)=0
The requested action has been performed and the status is available.
virtual bool IsRaw() const
Perform the handshake and the authentication for each physical stream.
StreamAction
Stream actions that may be triggered by incoming control messages.
@ RequestClose
Send a close request.
@ HoldStream
Stop sending requests [not yet implemented].
virtual bool NeedEncryption(HandShakeData *handShakeData, AnyObject &channelData)=0
virtual uint32_t MessageReceived(Message &msg, uint16_t subStream, AnyObject &channelData)=0
Check if the message invokes a stream action.
virtual uint16_t SubStreamNumber(AnyObject &channelData)=0
Return a number of substreams per stream that should be created.
virtual bool IsStreamTTLElapsed(time_t inactiveTime, AnyObject &channelData)=0
Check if the stream should be disconnected.
virtual PathID Multiplex(Message *msg, AnyObject &channelData, PathID *hint=0)=0
virtual Status Query(uint16_t query, AnyObject &result, AnyObject &channelData)=0
Query the channel.
virtual PathID MultiplexSubStream(Message *msg, AnyObject &channelData, PathID *hint=0)=0
virtual XRootDStatus GetBody(Message &message, Socket *socket)=0
virtual void FinalizeChannel(AnyObject &channelData)=0
Finalize channel.
virtual void Disconnect(AnyObject &channelData, uint16_t subStreamId)=0
The stream has been disconnected, do the cleanups.
virtual ~TransportHandler()
virtual bool HandShakeDone(HandShakeData *handShakeData, AnyObject &channelData)=0
virtual void WaitBeforeExit()=0
Wait before exit.
virtual void InitializeChannel(const URL &url, AnyObject &channelData)=0
Initialize channel.
virtual XRootDStatus GetHeader(Message &message, Socket *socket)=0
virtual void DecFileInstCnt(AnyObject &channelData)=0
Decrement file object instance count bound to this channel.
virtual URL GetBindPreference(const URL &url, AnyObject &channelData)=0
Get bind preference for the next data stream.
virtual Status IsStreamBroken(time_t inactiveTime, AnyObject &channelData)=0
virtual XRootDStatus HandShake(HandShakeData *handShakeData, AnyObject &channelData)=0
HandHake.
virtual void MessageSent(Message *msg, uint16_t subStream, uint32_t bytesSent, AnyObject &channelData)=0
Notify the transport about a message having been sent.
virtual XRootDStatus GetMore(Message &message, Socket *socket)=0
virtual Status GetSignature(Message *toSign, Message *&sign, AnyObject &channelData)=0
Get signature for given message.
const uint16_t stOK
Everything went OK.
none object for initializing empty Optional
Data structure that carries the handshake information.
uint16_t step
Handshake step.
time_t startTime
Timestamp of when the handshake started.
std::string streamName
Name of the stream.
std::string clientName
Client name (an IPv6 representation)
HandShakeData(const URL *addr, uint16_t subStream)
Constructor.
const URL * url
Destination URL.
const XrdNetAddr * serverAddr
Server address.
Message * in
Message that has been received.
uint16_t subStreamId
Sub-stream id.
Message * out
Message to be sent out.
PathID(uint16_t u=0, uint16_t d=0)
Procedure execution status.
static const uint16_t IpAddr
static const uint16_t HostName
static const uint16_t IpStack
static const uint16_t Name
Transport name, returns const char *.
static const uint16_t Auth
Transport name, returns std::string *.
XRootD related protocol queries.
static const uint16_t ServerFlags
returns server flags
static const uint16_t ProtocolVersion
returns the protocol version
static const uint16_t IsEncrypted
returns true if the channel is encrypted