xrootd
|
Utility class encapsulating reading response message logic. More...
#include <XrdClAsyncMsgReader.hh>
Public Member Functions | |
AsyncMsgReader (TransportHandler &xrdTransport, Socket &socket, const std::string &strmname, Stream &strm, uint16_t substrmnb) | |
virtual | ~AsyncMsgReader () |
Destructor. | |
void | Reset () |
Reset the state of the object (makes it ready to read out next msg) | |
XRootDStatus | Read () |
Read out the response from the socket. | |
Private Types | |
enum | Stage { ReadStart , ReadHeader , ReadAttn , ReadMore , ReadMsgBody , ReadRawData , ReadDone } |
Stages of reading out a response from the socket. More... | |
Private Member Functions | |
XRootDStatus | ReadAttnActnum () |
bool | IsStatusRsp () |
bool | HasEmbeddedRsp () |
Private Attributes | |
Stage | readstage |
TransportHandler & | xrdTransport |
Socket & | socket |
const std::string & | strmname |
Stream & | strm |
uint16_t | substrmnb |
std::shared_ptr< Message > | inmsg |
uint32_t | inmsgsize |
MsgHandler * | inhandler |
Utility class encapsulating reading response message logic.
|
private |
|
inline |
Constructor
xrdTransport | : the (xrootd) transport layer |
socket | : the socket with the message to be read out |
strmname | : stream name |
strm | : the stream encapsulating the connection |
substrmnb | : the substream number |
|
inlinevirtual |
Destructor.
|
inlineprivate |
References ServerResponseBody_Attn::actnum, inmsg, and kXR_asynresp.
Referenced by Read().
|
inlineprivate |
References inmsg, kXR_status, and ServerResponseHeader::status.
Referenced by Read().
|
inline |
Read out the response from the socket.
References XrdCl::AsyncSockMsg, XrdCl::Status::code, XrdCl::MsgHandler::Corrupted, XrdCl::Log::Dump(), XrdCl::errCorruptedHeader, XrdCl::TransportHandler::GetBody(), XrdCl::TransportHandler::GetHeader(), XrdCl::DefaultEnv::GetLog(), XrdCl::TransportHandler::GetMore(), HasEmbeddedRsp(), ServerResponse::hdr, inhandler, inmsg, inmsgsize, XrdCl::Stream::InspectStatusRsp(), XrdCl::Stream::InstallIncHandler(), XrdCl::Status::IsOK(), IsStatusRsp(), kXR_attn, XrdCl::MsgHandler::More, XrdCl::Stream::OnIncoming(), XrdCl::MsgHandler::Raw, ReadAttn, ReadAttnActnum(), ReadDone, ReadHeader, XrdCl::MsgHandler::ReadMessageBody(), ReadMore, ReadMsgBody, ReadRawData, readstage, ReadStart, socket, ServerResponseHeader::status, XrdCl::stError, strm, strmname, substrmnb, XrdCl::suRetry, and xrdTransport.
|
inlineprivate |
References ServerResponseBody_Attn::actnum, XrdCl::Status::code, inmsg, XrdCl::Status::IsOK(), XrdCl::Socket::Read(), socket, and XrdCl::suRetry.
Referenced by Read().
|
inline |
|
private |
|
private |
Referenced by HasEmbeddedRsp(), IsStatusRsp(), Read(), ReadAttnActnum(), and Reset().
|
private |
Referenced by Read(), and ReadAttnActnum().
|
private |
Referenced by Read().
|
private |
Referenced by Read().
|
private |
Referenced by Read().