40 #include "XProtocol/XProtocol.hh"
41 #include "XrdSys/XrdSysPthread.hh"
44 #include <netinet/in.h>
47 class XrdClientPhyConnection;
49 class XrdClientMessage {
56 XrdSysRecMutex fMultireadMutex;
60 static kXR_unt16 CharStreamid2Int(kXR_char *charstreamid);
61 static void Int2CharStreamid(kXR_char *charstreamid,
short intstreamid);
70 ServerResponseHeader fHdr;
72 XrdClientMessage(ServerResponseHeader header);
79 inline int DataLen() {
return fHdr.dlen; }
82 inline void *GetData() {
return fData;}
83 inline int GetStatusCode() {
return fStatusCode; }
85 inline int HeaderStatus() {
return fHdr.status; }
87 inline kXR_unt16 HeaderSID() {
return CharStreamid2Int(fHdr.streamid); }
89 bool IsAttn() {
return (HeaderStatus() == kXR_attn); }
91 inline bool IsError() {
return (fStatusCode != kXrdMSC_ok); };
93 inline bool IsMarshalled() {
return fMarshalled; }
95 inline bool MatchStreamid(
short sid) {
return (HeaderSID() == sid);}
96 int ReadRaw(XrdClientPhyConnection *phy);
97 inline void SetHeaderStatus(kXR_unt16 sts) { fHdr.status = sts; }
98 inline void SetMarshalled(
bool m) { fMarshalled = m; }
99 inline void SetStatusCode(kXR_unt16 status) { fStatusCode = status; }