1 #ifndef __XRDXROOTDTRANSIT_HH_
2 #define __XRDXROOTDTRANSIT_HH_
33 #include <sys/types.h>
74 static int Attn(
XrdLink *lP,
short *theSID,
int rcode,
75 const struct iovec *ioVec,
int ioNum,
int ioLen);
124 bool Run(
const char *xreqP,
133 int Send(
int rcode,
const struct iovec *ioVec,
int ioNum,
int ioLen);
139 int Send(
long long offset,
int dlen,
int fdnum);
148 {
return SetSF(fhandle, seton);}
155 {runWMax = wtime; runWCall = notify;}
171 const struct iovec *ioV,
int ioN,
int ioL);
172 bool Fail(
int ecode,
const char *etext);
175 const char *nameP,
const char *protP
177 bool ReqWrite(
char *xdataP,
int xdataL);
178 bool RunCopy(
char *buffP,
int buffL);
180 const struct iovec *ioV,
int ioN,
int ioL);
182 const struct iovec *ioV,
int ioN,
int ioL);
184 class SchedReq :
public XrdJob
187 void DoIt() {(spanP->*cbFunc)();}
190 :
XrdJob(why), spanP(tP), cbFunc(cbP) {}
203 static const char *reqTab;
206 const char *runEText;
215 std::atomic<int> runStatus;
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).