24# include <netinet/in.h>
37#define XPRNOTIFY(m,e) \
39 TRACET(TraceID(), XERR, m << ": " << e); \
42 if (e.length() > 0) { \
43 TRACET(TraceID(), RSP, m << " (" << e <<")"); \
45 TRACET(TraceID(), RSP, m); \
50#define XPRTRACING(a) ((a != 0) || (TRACING(RSP)))
53 { XrdSysMutexHelper mh(fMutex); \
55 TRACE(XERR, "link is undefined! "); \
57 } else if (fLink->FDnum() < 0) { \
58 TRACE(XERR, "link descriptor invalid for link "<<fLink<<"! ("<< fLink->FDnum()<<")"); \
62#define CHECKLINKNOMTX \
64 TRACE(XERR, "link is undefined! "); \
66 } else if (fLink->FDnum() < 0) { \
67 TRACE(XERR, "link descriptor invalid for link "<<fLink<<"! ("<< fLink->FDnum()<<")"); \
82 ServerResponseHeader
resp;
104 ServerResponseHeader
resp;
127 ServerResponseHeader
resp;
155 ServerResponseHeader
resp;
163 resp.dlen =
static_cast<kXR_int32
>(
htonl(dlen));
183 ServerResponseHeader
resp;
199 resp.dlen =
static_cast<kXR_int32
>(
htonl((dlen+
sizeof(
xbuf))));
218 void *
data,
int dlen )
226 ServerResponseHeader
resp;
241 resp.dlen =
static_cast<kXR_int32
>(
htonl((dlen+
sizeof(
xbuf))));
247 XPDFORM(
tmsg,
"sending %d data bytes; status=%d; action=%d",
261 kXR_int32 cid,
void *
data,
int dlen )
269 ServerResponseHeader
resp;
276 kXR_int32
xcid =
static_cast<kXR_int32
>(
htonl(cid));
295 XPDFORM(
tmsg,
"sending %d data bytes; status=%d; action=%d; cid=%d",
317 ServerResponseHeader
resp;
344 void *
data,
int dlen )
352 ServerResponseHeader
resp;
357 kXR_int32
i1 =
static_cast<kXR_int32
>(
htonl(int1));
358 kXR_int16
i2 =
static_cast<kXR_int16
>(
htons(int2));
359 kXR_int16
i3 =
static_cast<kXR_int16
>(
htons(int3));
360 int ilen =
sizeof(
i1) +
sizeof(
i2) +
sizeof(
i3);
380 XPDFORM(
tmsg,
"sending %d data bytes; int1=%d; int2=%d; int3=%d",
381 dlen, int1, int2, int3);
383 XPDFORM(
tmsg,
"sending int1=%d; int2=%d; int3=%d", int1, int2, int3);
401 ServerResponseHeader
resp;
406 kXR_int32
i1 =
static_cast<kXR_int32
>(
htonl(int1));
407 kXR_int32
i2 =
static_cast<kXR_int32
>(
htonl(int2));
426 XPDFORM(
tmsg,
"sending %d data bytes; int1=%d; int2=%d",
429 XPDFORM(
tmsg,
"sending int1=%d; int2=%d", int1, int2);
447 ServerResponseHeader
resp;
453 kXR_int32
i1 =
static_cast<kXR_int32
>(
htonl(int1));
470 XPDFORM(
tmsg,
"sending %d data bytes; int1=%d", dlen, int1);
490 ServerResponseHeader
resp;
498 resp.dlen =
static_cast<kXR_int32
>(
htonl(dlen));
518 ServerResponseHeader
resp;
531 resp.dlen =
static_cast<kXR_int32
>(
htonl(dlen));
551 ServerResponseHeader
resp;
564 resp.dlen =
static_cast<kXR_int32
>(
htonl(dlen));
596 return ((
rc < 0) ?
fLink->setEtext(
"send failure") : 0);
631 return ((
rc < 0) ?
fLink->setEtext(
"send (writev) failure") : 0);
648 fResp.streamid[0] = stream[0];
649 fResp.streamid[1] = stream[1];
659 unsigned char stream[2];
663 memcpy((
void *)&stream[0], (
const void *)&sid,
sizeof(sid));
665 fResp.streamid[0] = stream[0];
666 fResp.streamid[1] = stream[1];
677 memcpy((
void *)&sid, (
void *)&
fResp.streamid[0],
sizeof(sid));
715 }
else if (
fTag.length() > 0) {
730 static char hv[] =
"0123456789abcdef";
734 for (i = 0; i < (
int)
sizeof(
fResp.streamid); i++) {
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
#define TRACE(Flag, Args)
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void data
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t UChar_t len
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t bytes
#define XrdSysMutexHelper
void Set(XrdLink *l)
Set the link to be used by this response.
void GetSID(unsigned short &sid)
Get stream ID (to be able to restore it later.
int Send(void)
Auxilliary Send method.
int LinkSend(const char *buff, int len, XrdOucString &e)
Method actually sending the buffer(s) over the link.
int SendI(kXR_int32 int1, void *data=0, int dlen=0)
Auxilliary Send method.
ServerResponseHeader fResp
void SetTrsid()
Auxilliary Set method.
void SetTraceID()
Auxilliary set method.