19 #ifndef SRC_XRDCL_XRDCLASYNCHSREADER_HH_
20 #define SRC_XRDCL_XRDCLASYNCHSREADER_HH_
50 const std::string &strmname,
52 uint16_t substrmnb) : readstage( ReadStart ),
53 xrdTransport( xrdTransport ),
57 substrmnb( substrmnb )
82 readstage = ReadHeader;
93 "[%s] Received message header, size: %d",
94 strmname.c_str(), inmsg->GetCursor() );
98 readstage = ReadMsgBody;
109 strmname.c_str(), inmsg->GetSize() );
110 readstage = ReadDone;
130 readstage = ReadStart;
131 return std::move( inmsg );
139 readstage = ReadStart;
164 TransportHandler &xrdTransport;
166 const std::string &strmname;
173 std::unique_ptr<Message> inmsg;
Utility class encapsulating reading hand-shake response logic.
void Reset()
Reset the state of the object (makes it ready to read out next msg)
std::unique_ptr< Message > ReleaseMsg()
Transfer the received message ownership.
AsyncHSReader(TransportHandler &xrdTransport, Socket &socket, const std::string &strmname, Stream &strm, uint16_t substrmnb)
XRootDStatus Read()
Read out the response from the socket.
static Log * GetLog()
Get default log.
void Dump(uint64_t topic, const char *format,...)
Print a dump message.
The message representation used throughout the system.
Perform the handshake and the authentication for each physical stream.
virtual XRootDStatus GetBody(Message &message, Socket *socket)=0
virtual XRootDStatus GetHeader(Message &message, Socket *socket)=0
const uint64_t AsyncSockMsg
uint16_t code
Error type, or additional hints on what to do.
bool IsOK() const
We're fine.