19#ifndef SRC_XRDCL_XRDCLASYNCMSGREADER_HH_
20#define SRC_XRDCL_XRDCLASYNCMSGREADER_HH_
96 inmsg = std::make_shared<Message>();
120 inmsg->ReAllocate( 16 );
176 uint32_t bytesRead = 0;
254 const uint32_t hdrSize = rspst->
hdr.
dlen;
255 if(
inmsg->GetSize() != hdrSize + 8 )
271 "corrupted status body in message 0x%x.",
278 "status body of message 0x%x.",
325 size_t btsleft = 8 - (
inmsg->GetCursor() - 8 );
333 inmsg->AdvanceCursor( btsrd );
@ kXR_asynresp
Definition: XProtocol.hh:936
@ kXR_status
Definition: XProtocol.hh:905
@ kXR_attn
Definition: XProtocol.hh:899
@ kXR_1stRequest
Definition: XProtocol.hh:111
Utility class encapsulating reading response message logic.
Definition: XrdClAsyncMsgReader.hh:37
void Reset()
Reset the state of the object (makes it ready to read out next msg)
Definition: XrdClAsyncMsgReader.hh:71
Socket & socket
Definition: XrdClAsyncMsgReader.hh:373
TransportHandler & xrdTransport
Definition: XrdClAsyncMsgReader.hh:372
const std::string & strmname
Definition: XrdClAsyncMsgReader.hh:374
std::shared_ptr< Message > inmsg
Definition: XrdClAsyncMsgReader.hh:382
uint32_t inmsgsize
Definition: XrdClAsyncMsgReader.hh:383
Stage readstage
Definition: XrdClAsyncMsgReader.hh:367
Stage
Stages of reading out a response from the socket.
Definition: XrdClAsyncMsgReader.hh:355
@ ReadAttn
Definition: XrdClAsyncMsgReader.hh:358
@ ReadRawData
Definition: XrdClAsyncMsgReader.hh:360
@ ReadMsgBody
Definition: XrdClAsyncMsgReader.hh:359
@ ReadHeader
Definition: XrdClAsyncMsgReader.hh:357
@ ReadStart
Definition: XrdClAsyncMsgReader.hh:356
@ ReadDone
Definition: XrdClAsyncMsgReader.hh:361
bool HasEmbeddedRsp()
Definition: XrdClAsyncMsgReader.hh:345
uint16_t substrmnb
Definition: XrdClAsyncMsgReader.hh:376
XRootDStatus Read()
Read out the response from the socket.
Definition: XrdClAsyncMsgReader.hh:82
virtual ~AsyncMsgReader()
Destructor.
Definition: XrdClAsyncMsgReader.hh:66
MsgHandler * inhandler
Definition: XrdClAsyncMsgReader.hh:384
XRootDStatus ReadAttnActnum()
Definition: XrdClAsyncMsgReader.hh:319
AsyncMsgReader(TransportHandler &xrdTransport, Socket &socket, const std::string &strmname, Stream &strm, uint16_t substrmnb)
Definition: XrdClAsyncMsgReader.hh:48
Stream & strm
Definition: XrdClAsyncMsgReader.hh:375
static Log * GetLog()
Get default log.
Handle diagnostics.
Definition: XrdClLog.hh:101
void Error(uint64_t topic, const char *format,...)
Report an error.
void Dump(uint64_t topic, const char *format,...)
Print a dump message.
Message handler.
Definition: XrdClPostMasterInterfaces.hh:51
virtual XRootDStatus ReadMessageBody(Message *msg, Socket *socket, uint32_t &bytesRead)
Definition: XrdClPostMasterInterfaces.hh:138
@ Raw
Definition: XrdClPostMasterInterfaces.hh:63
@ RemoveHandler
Definition: XrdClPostMasterInterfaces.hh:61
@ More
there are more (non-raw) data to be read
Definition: XrdClPostMasterInterfaces.hh:72
@ Corrupted
Definition: XrdClPostMasterInterfaces.hh:69
A network socket.
Definition: XrdClSocket.hh:43
XRootDStatus Read(char *buffer, size_t size, int &bytesRead)
Stream.
Definition: XrdClStream.hh:50
MsgHandler * InstallIncHandler(std::shared_ptr< Message > &msg, uint16_t stream)
void OnIncoming(uint16_t subStream, std::shared_ptr< Message > msg, uint32_t bytesReceived)
Call back when a message has been reconstructed.
uint16_t InspectStatusRsp(uint16_t stream, MsgHandler *&incHandler)
Perform the handshake and the authentication for each physical stream.
Definition: XrdClPostMasterInterfaces.hh:310
virtual XRootDStatus GetBody(Message &message, Socket *socket)=0
virtual XRootDStatus GetHeader(Message &message, Socket *socket)=0
Request status.
Definition: XrdClXRootDResponses.hh:219
static XRootDStatus UnMarshalStatusBody(Message &msg, uint16_t reqType)
Unmarshall the body of the status response.
Definition: XrdClAction.hh:34
const uint16_t suRetry
Definition: XrdClStatus.hh:40
const uint16_t stError
An error occurred that could potentially be retried.
Definition: XrdClStatus.hh:32
const uint16_t errDataError
data is corrupted
Definition: XrdClStatus.hh:63
const uint64_t AsyncSockMsg
Definition: XrdClConstants.hh:41
const uint16_t errCorruptedHeader
Definition: XrdClStatus.hh:103
Definition: XProtocol.hh:939
kXR_int32 actnum
Definition: XProtocol.hh:940
kXR_int32 dlen
Definition: XProtocol.hh:1236
kXR_char requestid
Definition: XProtocol.hh:1233
Definition: XProtocol.hh:1255
struct ServerResponseBody_Status bdy
Definition: XProtocol.hh:1257
struct ServerResponseHeader hdr
Definition: XProtocol.hh:1256
Definition: XProtocol.hh:1282
ServerResponseHeader hdr
Definition: XProtocol.hh:1283
uint16_t code
Error type, or additional hints on what to do.
Definition: XrdClStatus.hh:146
bool IsOK() const
We're fine.
Definition: XrdClStatus.hh:123