xrootd
Loading...
Searching...
No Matches
Public Member Functions | Private Types | Private Attributes | List of all members
XrdCl::AsyncHSReader Class Reference

Utility class encapsulating reading hand-shake response logic. More...

#include <XrdClAsyncHSReader.hh>

Collaboration diagram for XrdCl::AsyncHSReader:
Collaboration graph
[legend]

Public Member Functions

 AsyncHSReader (TransportHandler &xrdTransport, Socket &socket, const std::string &strmname, Stream &strm, uint16_t substrmnb)
 
XRootDStatus Read ()
 Read out the response from the socket.
 
std::unique_ptr< MessageReleaseMsg ()
 Transfer the received message ownership.
 
void Reset ()
 Reset the state of the object (makes it ready to read out next msg)
 

Private Types

enum  Stage { ReadStart , ReadHeader , ReadMsgBody , ReadDone }
 Stages of reading out a response from the socket. More...
 

Private Attributes

Stage readstage
 
TransportHandlerxrdTransport
 
Socketsocket
 
const std::string & strmname
 
Streamstrm
 
uint16_t substrmnb
 
std::unique_ptr< Messageinmsg
 

Detailed Description

Utility class encapsulating reading hand-shake response logic.

Member Enumeration Documentation

◆ Stage

Stages of reading out a response from the socket.

Enumerator
ReadStart 
ReadHeader 
ReadMsgBody 
ReadDone 

Constructor & Destructor Documentation

◆ AsyncHSReader()

XrdCl::AsyncHSReader::AsyncHSReader ( TransportHandler xrdTransport,
Socket socket,
const std::string &  strmname,
Stream strm,
uint16_t  substrmnb 
)
inline

Constructor

Parameters
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

Member Function Documentation

◆ Read()

XRootDStatus XrdCl::AsyncHSReader::Read ( )
inline

◆ ReleaseMsg()

std::unique_ptr< Message > XrdCl::AsyncHSReader::ReleaseMsg ( )
inline

Transfer the received message ownership.

References inmsg, readstage, and ReadStart.

◆ Reset()

void XrdCl::AsyncHSReader::Reset ( )
inline

Reset the state of the object (makes it ready to read out next msg)

References inmsg, readstage, and ReadStart.

Member Data Documentation

◆ inmsg

std::unique_ptr<Message> XrdCl::AsyncHSReader::inmsg
private

Referenced by Read(), ReleaseMsg(), and Reset().

◆ readstage

Stage XrdCl::AsyncHSReader::readstage
private

Referenced by Read(), ReleaseMsg(), and Reset().

◆ socket

Socket& XrdCl::AsyncHSReader::socket
private

Referenced by Read().

◆ strm

Stream& XrdCl::AsyncHSReader::strm
private

◆ strmname

const std::string& XrdCl::AsyncHSReader::strmname
private

Referenced by Read().

◆ substrmnb

uint16_t XrdCl::AsyncHSReader::substrmnb
private

◆ xrdTransport

TransportHandler& XrdCl::AsyncHSReader::xrdTransport
private

Referenced by Read().


The documentation for this class was generated from the following file: