12 #ifndef ROOT_XrdProofdResponse
13 #define ROOT_XrdProofdResponse
31 #include "XrdOuc/XrdOucString.hh"
36 class XrdProofdResponse
39 XrdProofdResponse() { Reset(); }
40 virtual ~XrdProofdResponse() {}
42 inline const char *STRID() {
return (
const char *)fTrsid;}
43 inline const char *TraceID()
const {
return fTraceID.c_str(); }
45 inline XrdLink *Link()
const {
return fLink; }
47 int LinkSend(
const char *buff,
int len, XrdOucString &e);
48 int LinkSend(
const struct iovec *iov,
49 int iocnt,
int len, XrdOucString &e);
52 int Send(
const char *msg);
53 int Send(
void *data,
int dlen);
54 int Send(XResponseType rcode);
55 int Send(XResponseType rcode,
void *data,
int dlen);
56 int Send(XErrorCode ecode,
const char *msg);
57 int Send(XPErrorCode ecode,
const char *msg);
58 int Send(XResponseType rcode,
int info,
char *data = 0);
59 int Send(XResponseType rcode, XProofActionCode acode,
int info);
60 int Send(XResponseType rcode,
61 XProofActionCode acode,
void *data,
int dlen);
62 int Send(XResponseType rcode, XProofActionCode acode,
63 kXR_int32 sid,
void *data,
int dlen);
65 int SendI(kXR_int32 int1,
void *data = 0,
int dlen = 0);
66 int SendI(kXR_int32 int1, kXR_int32 int2,
void *data = 0,
int dlen = 0);
67 int SendI(kXR_int32 int1, kXR_int16 int2, kXR_int16 int3,
68 void *data = 0,
int dlen = 0);
71 inline void SetTag(
const char *tag) { fTag = tag; }
73 void Set(
unsigned char *stream);
74 void Set(
unsigned short streamid);
75 void Set(ServerResponseHeader *resp);
77 void GetSID(
unsigned short &sid);
80 void Reset() { XrdSysMutexHelper mh(fMutex);
81 fLink = 0; *fTrsid =
'\0'; fSID = 0;
82 fResp.dlen = 0; fResp.status = 0;
83 fResp.streamid[0] = 0; fResp.streamid[1] = 0; }
86 XrdSysRecMutex fMutex;
90 ServerResponseHeader fResp;
96 XrdOucString fTraceID;