19 #ifndef SRC_XRDCL_XRDCLASYNCMSGREADER_HH_
20 #define SRC_XRDCL_XRDCLASYNCMSGREADER_HH_
53 xrdTransport( xrdTransport ),
57 substrmnb( substrmnb ),
96 inmsg = std::make_shared<Message>();
120 inmsg->ReAllocate( 16 );
194 uint32_t bytesRead = 0;
287 size_t btsleft = 8 - (
inmsg->GetCursor() - 8 );
295 inmsg->AdvanceCursor( btsrd );
Definition: XrdClAsyncMsgReader.hh:325
Definition: XrdClAsyncMsgReader.hh:326
bool IsStatusRsp()
Definition: XrdClAsyncMsgReader.hh:307
Definition: XProtocol.hh:936
std::shared_ptr< Message > inmsg
Definition: XrdClAsyncMsgReader.hh:351
XRootDStatus Read()
Read out the response from the socket.
Definition: XrdClAsyncMsgReader.hh:82
TransportHandler & xrdTransport
Definition: XrdClAsyncMsgReader.hh:341
Socket & socket
Definition: XrdClAsyncMsgReader.hh:342
const uint64_t AsyncSockMsg
Definition: XrdClConstants.hh:41
bool HasEmbeddedRsp()
Definition: XrdClAsyncMsgReader.hh:313
Message handler.
Definition: XrdClPostMasterInterfaces.hh:50
virtual ~AsyncMsgReader()
Destructor.
Definition: XrdClAsyncMsgReader.hh:66
virtual XRootDStatus ReadMessageBody(Message *msg, Socket *socket, uint32_t &bytesRead)
Definition: XrdClPostMasterInterfaces.hh:138
uint16_t code
Error type, or additional hints on what to do.
Definition: XrdClStatus.hh:147
Stage readstage
Definition: XrdClAsyncMsgReader.hh:336
AsyncMsgReader(TransportHandler &xrdTransport, Socket &socket, const std::string &strmname, Stream &strm, uint16_t substrmnb)
Definition: XrdClAsyncMsgReader.hh:48
const std::string & strmname
Definition: XrdClAsyncMsgReader.hh:343
void Dump(uint64_t topic, const char *format,...)
Print a dump message.
Definition: XrdClPostMasterInterfaces.hh:69
Definition: XrdClAsyncMsgReader.hh:329
XRootDStatus ReadAttnActnum()
Definition: XrdClAsyncMsgReader.hh:281
MsgHandler * inhandler
Definition: XrdClAsyncMsgReader.hh:353
static Log * GetLog()
Get default log.
Definition: XProtocol.hh:899
Perform the handshake and the authentication for each physical stream.
Definition: XrdClPostMasterInterfaces.hh:309
const uint16_t stError
An error occurred that could potentially be retried.
Definition: XrdClStatus.hh:32
Request status.
Definition: XrdClXRootDResponses.hh:218
const uint16_t errCorruptedHeader
Definition: XrdClStatus.hh:103
uint16_t InspectStatusRsp(uint16_t stream, MsgHandler *&incHandler)
MsgHandler * InstallIncHandler(std::shared_ptr< Message > &msg, uint16_t stream)
Definition: XProtocol.hh:1281
Definition: XrdClAsyncMsgReader.hh:328
uint16_t substrmnb
Definition: XrdClAsyncMsgReader.hh:345
Utility class encapsulating reading response message logic.
Definition: XrdClAsyncMsgReader.hh:36
Definition: XrdClAsyncMsgReader.hh:330
Definition: XrdClAsyncMsgReader.hh:327
void Reset()
Reset the state of the object (makes it ready to read out next msg)
Definition: XrdClAsyncMsgReader.hh:71
ServerResponseHeader hdr
Definition: XProtocol.hh:1283
const uint16_t suRetry
Definition: XrdClStatus.hh:40
Stream.
Definition: XrdClStream.hh:51
virtual XRootDStatus GetMore(Message &message, Socket *socket)=0
Stage
Stages of reading out a response from the socket.
Definition: XrdClAsyncMsgReader.hh:322
bool IsOK() const
We're fine.
Definition: XrdClStatus.hh:124
Definition: XrdClAsyncMsgReader.hh:324
Stream & strm
Definition: XrdClAsyncMsgReader.hh:344
virtual XRootDStatus GetBody(Message &message, Socket *socket)=0
virtual XRootDStatus GetHeader(Message &message, Socket *socket)=0
void OnIncoming(uint16_t subStream, std::shared_ptr< Message > msg, uint32_t bytesReceived)
Call back when a message has been reconstructed.
there are more (non-raw) data to be read
Definition: XrdClPostMasterInterfaces.hh:72
Definition: XProtocol.hh:905
kXR_int32 actnum
Definition: XProtocol.hh:940
A network socket.
Definition: XrdClSocket.hh:42
uint32_t inmsgsize
Definition: XrdClAsyncMsgReader.hh:352
Handle diagnostics.
Definition: XrdClLog.hh:100
Definition: XProtocol.hh:939
Definition: XrdClPostMasterInterfaces.hh:63
virtual XRootDStatus Read(char *buffer, size_t size, int &bytesRead)