XrdLink Class Reference

#include <XrdLink.hh>

Inheritance diagram for XrdLink:

Inheritance graph
[legend]
Collaboration diagram for XrdLink:

Collaboration graph
[legend]
List of all members.

Public Types

typedef XrdOucSFVec sfVec

Public Member Functions

XrdNetAddrInfo * AddrInfo ()
void Bind ()
void Bind (pthread_t tid)
int Client (char *buff, int blen)
int Close (int defer=0)
void DoIt ()
void Enable ()
int FDnum ()
int getIOStats (long long &inbytes, long long &outbytes, int &numstall, int &numtardy)
XrdProtocolgetProtocol ()
void Hold (int lk)
const char * Host ()
unsigned int Inst ()
bool isFlawed ()
bool isInstance (unsigned int inst)
const char * Name ()
const XrdNetAddr * NetAddr ()
int Peek (char *buff, int blen, int timeout=-1)
int Recv (char *buff, int blen)
int Recv (char *buff, int blen, int timeout)
int RecvAll (char *buff, int blen, int timeout=-1)
int Send (const char *buff, int blen)
int Send (const struct iovec *iov, int iocnt, int bytes=0)
int Send (const sfVec *sdP, int sdn)
void Serialize ()
int setEtext (const char *text)
void setID (const char *userid, int procid)
void setLocation (XrdNetAddrInfo::LocInfo &loc)
XrdProtocolsetProtocol (XrdProtocol *pp)
void setRef (int cnt)
void syncStats (int *ctime=0)
int Terminate (const XrdLink *owner, int fdnum, unsigned int inst)
time_t timeCon ()
int UseCnt ()
void armBridge ()
int hasBridge ()
 XrdLink ()
 ~XrdLink ()

Static Public Member Functions

static XrdLinkAlloc (XrdNetAddr &peer, int opts=0)
static XrdLinkfd2link (int fd)
static XrdLinkfd2link (int fd, unsigned int inst)
static XrdLinkFind (int &curr, XrdLinkMatch *who=0)
static int getName (int &curr, char *bname, int blen, XrdLinkMatch *who=0)
static void Init (XrdSysError *eP, XrdOucTrace *tP, XrdScheduler *sP)
static void Init (XrdInet *iP)
static void setKWT (int wkSec, int kwSec)
static int Setup (int maxfd, int idlewait)
static int Stats (char *buff, int blen, int do_sync=0)

Public Attributes

char * ID

Static Public Attributes

static int sfOK

Private Member Functions

void Reset ()
int sendData (const char *Buff, int Blen)

Private Attributes

long long BytesIn
long long BytesInTot
long long BytesOut
long long BytesOutTot
int stallCnt
int stallCntTot
int tardyCnt
int tardyCntTot
int SfIntr
XrdNetAddr Addr
char Uname [24]
char Lname [232]
char * HostName
int HNlen
pthread_t TID
XrdSysMutex opMutex
XrdSysMutex rdMutex
XrdSysMutex wrMutex
XrdSysSemaphore IOSemaphore
XrdSysCondVarKillcvP
XrdLinkNext
XrdProtocolProtocol
XrdProtocolProtoAlt
XrdPoll * Poller
pollfd * PollEnt
char * Etext
int FD
unsigned int Instance
time_t conTime
int InUse
int doPost
char LockReads
char KeepFD
char isEnabled
char isIdle
char inQ
char isBridged
char KillCnt

Static Private Attributes

static XrdSysErrorXrdLog
static XrdOucTraceXrdTrace
static XrdSchedulerXrdSched
static XrdInet * XrdNetTCP
static XrdSysMutex LTMutex
static XrdLink ** LinkTab
static char * LinkBat
static unsigned int LinkAlloc
static int LTLast
static const char * TraceID
static int devNull
static short killWait
static short waitKill
static long long LinkBytesIn
static long long LinkBytesOut
static long long LinkConTime
static long long LinkCountTot
static int LinkCount
static int LinkCountMax
static int LinkTimeOuts
static int LinkStalls
static int LinkSfIntr
static XrdSysMutex statsMutex
static const char KillMax = 60
static const char KillMsk = 0x7f
static const char KillXwt = 0x80

Friends

class XrdLinkScan
class XrdPoll
class XrdPollPoll
class XrdPollDev
class XrdPollE

Member Typedef Documentation

typedef XrdOucSFVec XrdLink::sfVec


Constructor & Destructor Documentation

XrdLink::XrdLink (  ) 

XrdLink::~XrdLink (  )  [inline]


Member Function Documentation

XrdNetAddrInfo* XrdLink::AddrInfo (  )  [inline]

Obtain the address information for this link.

Returns:
Pointer to the XrdAddrInfo object. The pointer is valid while the end-point is connected.

static XrdLink* XrdLink::Alloc ( XrdNetAddr &  peer,
int  opts = 0 
) [static]

Allocate a new link object.

Parameters:
peer The connection information for the endpoint.
opts Processing options: XRDLINK_NOCLOSE - do not close the FD upon recycling. XRDLINK_RDLOCK - obtain a lock prior to reading data.
Returns:
!0 The pointer to the new object. =0 A new link object could not be allocated.

void XrdLink::armBridge (  )  [inline]

void XrdLink::Bind ( pthread_t  tid  )  [inline]

void XrdLink::Bind (  )  [inline]

int XrdLink::Client ( char *  buff,
int  blen 
)

int XrdLink::Close ( int  defer = 0  ) 

void XrdLink::DoIt (  )  [virtual]

Implements XrdJob.

void XrdLink::Enable (  ) 

static XrdLink* XrdLink::fd2link ( int  fd,
unsigned int  inst 
) [inline, static]

static XrdLink* XrdLink::fd2link ( int  fd  )  [inline, static]

int XrdLink::FDnum (  )  [inline]

static XrdLink* XrdLink::Find ( int &  curr,
XrdLinkMatch who = 0 
) [static]

int XrdLink::getIOStats ( long long &  inbytes,
long long &  outbytes,
int &  numstall,
int &  numtardy 
) [inline]

static int XrdLink::getName ( int &  curr,
char *  bname,
int  blen,
XrdLinkMatch who = 0 
) [static]

XrdProtocol* XrdLink::getProtocol (  )  [inline]

int XrdLink::hasBridge (  )  [inline]

void XrdLink::Hold ( int  lk  )  [inline]

const char* XrdLink::Host (  )  [inline]

Get the fully qualified name of the endpoint.

Returns:
Pointer to fully qualified host name. The contents are valid while the endpoint is connected.

static void XrdLink::Init ( XrdInet *  iP  )  [inline, static]

static void XrdLink::Init ( XrdSysError eP,
XrdOucTrace tP,
XrdScheduler sP 
) [inline, static]

unsigned int XrdLink::Inst (  )  [inline]

Obtain the link's instance number.

Returns:
The link's instance number.

bool XrdLink::isFlawed (  )  [inline]

Indicate whether or not the link has an outstanding error.

Returns:
True the link has an outstanding error. the link has no outstanding error.

bool XrdLink::isInstance ( unsigned int  inst  )  [inline]

Indicate whether or not this link is of a particular instance. only be used for display and not for security purposes.

Parameters:
inst the expected instance number.
Returns:
True the link matches the instance number. the link differs the instance number.

const char* XrdLink::Name (  )  [inline]

Obtain the domain trimmed name of the end-point. The returned value should only be used for display and not for security purposes.

Returns:
Pointer to the name that remains valid during the link's lifetime.

const XrdNetAddr* XrdLink::NetAddr (  )  [inline]

Obtain the network address object for this link. The returned value is valid as long as the end-point is connected. Otherwise, it may change.

Returns:
Pointer to the object and remains valid during the link's lifetime.

int XrdLink::Peek ( char *  buff,
int  blen,
int  timeout = -1 
)

int XrdLink::Recv ( char *  buff,
int  blen,
int  timeout 
)

int XrdLink::Recv ( char *  buff,
int  blen 
)

int XrdLink::RecvAll ( char *  buff,
int  blen,
int  timeout = -1 
)

void XrdLink::Reset (  )  [private]

int XrdLink::Send ( const sfVec sdP,
int  sdn 
)

int XrdLink::Send ( const struct iovec *  iov,
int  iocnt,
int  bytes = 0 
)

int XrdLink::Send ( const char *  buff,
int  blen 
)

int XrdLink::sendData ( const char *  Buff,
int  Blen 
) [private]

void XrdLink::Serialize (  ) 

int XrdLink::setEtext ( const char *  text  ) 

void XrdLink::setID ( const char *  userid,
int  procid 
)

static void XrdLink::setKWT ( int  wkSec,
int  kwSec 
) [static]

void XrdLink::setLocation ( XrdNetAddrInfo::LocInfo &  loc  )  [inline]

XrdProtocol* XrdLink::setProtocol ( XrdProtocol pp  ) 

void XrdLink::setRef ( int  cnt  ) 

static int XrdLink::Setup ( int  maxfd,
int  idlewait 
) [static]

static int XrdLink::Stats ( char *  buff,
int  blen,
int  do_sync = 0 
) [static]

void XrdLink::syncStats ( int *  ctime = 0  ) 

int XrdLink::Terminate ( const XrdLink owner,
int  fdnum,
unsigned int  inst 
)

time_t XrdLink::timeCon (  )  [inline]

int XrdLink::UseCnt (  )  [inline]


Friends And Related Function Documentation

friend class XrdLinkScan [friend]

friend class XrdPoll [friend]

friend class XrdPollDev [friend]

friend class XrdPollE [friend]

friend class XrdPollPoll [friend]


Member Data Documentation

XrdNetAddr XrdLink::Addr [private]

long long XrdLink::BytesIn [private]

long long XrdLink::BytesInTot [private]

long long XrdLink::BytesOut [private]

long long XrdLink::BytesOutTot [private]

time_t XrdLink::conTime [private]

int XrdLink::devNull [static, private]

int XrdLink::doPost [private]

char* XrdLink::Etext [private]

int XrdLink::FD [private]

int XrdLink::HNlen [private]

char* XrdLink::HostName [private]

char* XrdLink::ID

char XrdLink::inQ [private]

unsigned int XrdLink::Instance [private]

int XrdLink::InUse [private]

XrdSysSemaphore XrdLink::IOSemaphore [private]

char XrdLink::isBridged [private]

char XrdLink::isEnabled [private]

char XrdLink::isIdle [private]

char XrdLink::KeepFD [private]

char XrdLink::KillCnt [private]

XrdSysCondVar* XrdLink::KillcvP [private]

const char XrdLink::KillMax = 60 [static, private]

const char XrdLink::KillMsk = 0x7f [static, private]

short XrdLink::killWait [static, private]

const char XrdLink::KillXwt = 0x80 [static, private]

unsigned int XrdLink::LinkAlloc [static, private]

char* XrdLink::LinkBat [static, private]

long long XrdLink::LinkBytesIn [static, private]

long long XrdLink::LinkBytesOut [static, private]

long long XrdLink::LinkConTime [static, private]

int XrdLink::LinkCount [static, private]

int XrdLink::LinkCountMax [static, private]

long long XrdLink::LinkCountTot [static, private]

int XrdLink::LinkSfIntr [static, private]

int XrdLink::LinkStalls [static, private]

XrdLink** XrdLink::LinkTab [static, private]

int XrdLink::LinkTimeOuts [static, private]

char XrdLink::Lname[232] [private]

char XrdLink::LockReads [private]

int XrdLink::LTLast [static, private]

XrdSysMutex XrdLink::LTMutex [static, private]

XrdLink* XrdLink::Next [private]

XrdSysMutex XrdLink::opMutex [private]

struct pollfd* XrdLink::PollEnt [private]

XrdPoll* XrdLink::Poller [private]

XrdProtocol* XrdLink::ProtoAlt [private]

XrdProtocol* XrdLink::Protocol [private]

XrdSysMutex XrdLink::rdMutex [private]

int XrdLink::SfIntr [private]

int XrdLink::sfOK [static]

int XrdLink::stallCnt [private]

int XrdLink::stallCntTot [private]

XrdSysMutex XrdLink::statsMutex [static, private]

int XrdLink::tardyCnt [private]

int XrdLink::tardyCntTot [private]

pthread_t XrdLink::TID [private]

const char* XrdLink::TraceID [static, private]

char XrdLink::Uname[24] [private]

short XrdLink::waitKill [static, private]

XrdSysMutex XrdLink::wrMutex [private]

XrdSysError* XrdLink::XrdLog [static, private]

XrdInet* XrdLink::XrdNetTCP [static, private]

XrdScheduler* XrdLink::XrdSched [static, private]

XrdOucTrace* XrdLink::XrdTrace [static, private]


The documentation for this class was generated from the following file:
Generated on 5 Oct 2016 for xrootd by  doxygen 1.4.7