1#ifndef __XRDXROOTDTRANSIT_HH_
2#define __XRDXROOTDTRANSIT_HH_
75static int Attn(
XrdLink *lP,
short *theSID,
int rcode,
76 const struct iovec *ioVec,
int ioNum,
int ioLen);
125bool Run(
const char *xreqP,
134int Send(
int rcode,
const struct iovec *ioVec,
int ioNum,
int ioLen);
140int Send(
long long offset,
int dlen,
int fdnum);
149 {
return SetSF(fhandle, seton);}
156 {runWMax = wtime; runWCall = notify;}
172 const struct iovec *ioV,
int ioN,
int ioL);
173bool Fail(
int ecode,
const char *etext);
176 const char *nameP,
const char *protP
178bool ReqWrite(
char *xdataP,
int xdataL);
179bool RunCopy(
char *buffP,
int buffL);
181 const struct iovec *ioV,
int ioN,
int ioL);
183 const struct iovec *ioV,
int ioN,
int ioL);
185class SchedReq :
public XrdJob
188 void DoIt() {(spanP->*cbFunc)();}
191 :
XrdJob(why), spanP(tP), cbFunc(cbP) {}
198static XrdObjectQ<XrdXrootdTransit> TranStack;
199XrdObject<XrdXrootdTransit> TranLink;
204static const char *reqTab;
206XrdXrootd::Bridge::Result *respObj;
216std::atomic<int> runStatus;
void Fatal(const char *op, const char *target)
XrdSys::RAtomic< int > RAtomic_int
friend class XrdScheduler
XrdJob(const char *desc="")
XrdProtocol(const char *jname)
int SetSF(kXR_char *fhandle, bool seton=false)
bool Run(const char *xreqP, char *xdataP=0, int xdataL=0)
Inject an xrootd request into the protocol stack.
static const char * ReqTable()
Initialize the valid request table.
void Redrive()
Redrive a request after a wait.
int Send(int rcode, const struct iovec *ioVec, int ioNum, int ioLen)
Handle request data response.
void Recycle(XrdLink *lp, int consec, const char *reason)
Handle link shutdown.
static void Init(XrdScheduler *schedP, int qMax, int qTTL)
Perform one-time initialization.
static XrdXrootdTransit * Alloc(XrdXrootd::Bridge::Result *respP, XrdLink *linkP, XrdSecEntity *seceP, const char *nameP, const char *protP)
Get a new transit object.
int setSF(kXR_char *fhandle, bool seton=false)
Set sendfile() enablement.
static int Attn(XrdLink *lP, short *theSID, int rcode, const struct iovec *ioVec, int ioNum, int ioLen)
Handle attention response (i.e. async response)
virtual ~XrdXrootdTransit()
void SetWait(int wtime, bool notify=false)
Set maximum wait time.
XrdXrootdTransit()
Constructor & Destructor.
void Proceed()
Resume processing after a waitresp completion.
bool Disc()
Handle dismantlement.
int Process(XrdLink *lp)
Handle link activation (replaces parent activation).