xrootd
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Static Public Attributes | Private Member Functions | Static Private Attributes | List of all members
XrdLinkCtl Class Reference

#include <XrdLinkCtl.hh>

Inheritance diagram for XrdLinkCtl:
Inheritance graph
[legend]
Collaboration diagram for XrdLinkCtl:
Collaboration graph
[legend]

Public Member Functions

 XrdLinkCtl ()
 Constructor.
 

Static Public Member Functions

static XrdLinkAlloc (XrdNetAddr &peer, int opts=0)
 
static XrdLinkfd2link (int fd)
 
static XrdLinkfd2link (int fd, unsigned int inst)
 
static XrdPollInfofd2PollInfo (int fd)
 
static XrdLinkFind (int &curr, XrdLinkMatch *who=0)
 
static int getName (int &curr, char *bname, int blen, XrdLinkMatch *who=0)
 
static void idleScan ()
 Look for idle links and close hem down.
 
static void setKWT (int wkSec, int kwSec)
 
static int Setup (int maxfds, int idlewt)
 
static void SyncAll ()
 Synchronize statustics for ll links.
 
static void Unhook (int fd)
 Unhook a link from the active table of links.
 

Static Public Attributes

static short killWait
 Link destruction control constants.
 
static short waitKill
 

Private Member Functions

 ~XrdLinkCtl ()
 

Static Private Attributes

static XrdSysMutex LTMutex
 
static XrdLinkCtl ** LinkTab
 
static char * LinkBat
 
static unsigned int LinkAlloc
 
static int LTLast
 
static int maxFD
 
static const char * TraceID
 

Additional Inherited Members

- Protected Member Functions inherited from XrdLinkXeq
int RecvIOV (const struct iovec *iov, int iocnt)
 
void Reset ()
 
int sendData (const char *Buff, int Blen)
 
int SendIOV (const struct iovec *iov, int iocnt, int bytes)
 
int SFError (int rc)
 
int TLS_Error (const char *act, XrdTls::RC rc)
 
bool TLS_Write (const char *Buff, int Blen)
 
XrdNetAddrInfoAddrInfo ()
 
int Backlog ()
 
int Client (char *buff, int blen)
 
int Close (bool defer=false)
 
void DoIt ()
 
int getIOStats (long long &inbytes, long long &outbytes, int &numstall, int &numtardy)
 
XrdTlsPeerCertsgetPeerCerts ()
 
XrdProtocolgetProtocol ()
 
const char * Name () const
 
const XrdNetAddrNetAddr () const
 
int Peek (char *buff, int blen, int timeout=-1)
 
int Recv (char *buff, int blen)
 
int Recv (char *buff, int blen, int timeout)
 
int Recv (const struct iovec *iov, int iocnt, int timeout)
 
int RecvAll (char *buff, int blen, int timeout=-1)
 
bool Register (const char *hName)
 
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 setID (const char *userid, int procid)
 
void setLocation (XrdNetAddrInfo::LocInfo &loc)
 
bool setNB ()
 
XrdProtocolsetProtocol (XrdProtocol *pp, bool push)
 
void setProtName (const char *name)
 
bool setTLS (bool enable, XrdTlsContext *ctx=0)
 
void Shutdown (bool getLock)
 
void syncStats (int *ctime=0)
 
int TLS_Peek (char *Buff, int Blen, int timeout)
 
int TLS_Recv (char *Buff, int Blen)
 
int TLS_Recv (char *Buff, int Blen, int timeout, bool havelock=false)
 
int TLS_Recv (const struct iovec *iov, int iocnt, int timeout)
 
int TLS_RecvAll (char *Buff, int Blen, int timeout)
 
int TLS_Send (const char *Buff, int Blen)
 
int TLS_Send (const struct iovec *iov, int iocnt, int bytes)
 
int TLS_Send (const sfVec *sfP, int sfN)
 
const char * verTLS ()
 
 XrdLinkXeq ()
 
 ~XrdLinkXeq ()
 
- Protected Member Functions inherited from XrdJob
 XrdJob (const char *desc="")
 
virtual ~XrdJob ()
 
- Static Protected Member Functions inherited from XrdLinkXeq
static int getName (int &curr, char *bname, int blen, XrdLinkMatch *who=0)
 
static int Stats (char *buff, int blen, bool do_sync=false)
 
- Protected Attributes inherited from XrdLinkXeq
long long BytesIn
 
long long BytesInTot
 
long long BytesOut
 
long long BytesOutTot
 
int stallCnt
 
int stallCntTot
 
int tardyCnt
 
int tardyCntTot
 
int SfIntr
 
XrdProtocolProtocol
 
XrdProtocolProtoAlt
 
XrdTlsSocket tlsIO
 
XrdNetAddr Addr
 
XrdSysMutex rdMutex
 
XrdSysMutex wrMutex
 
XrdSendQsendQ
 
int HNlen
 
bool LockReads
 
bool KeepFD
 
char isIdle
 
char Uname [24]
 
char Lname [256]
 
XrdLinkInfo LinkInfo
 
XrdPollInfo PollInfo
 
- Protected Attributes inherited from XrdJob
XrdJobNextJob
 
const char * Comment
 
- Static Protected Attributes inherited from XrdLinkXeq
static const char * TraceID
 
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
 

Constructor & Destructor Documentation

◆ XrdLinkCtl()

XrdLinkCtl::XrdLinkCtl ( )
inline

Constructor.

◆ ~XrdLinkCtl()

XrdLinkCtl::~XrdLinkCtl ( )
inlineprivate

Member Function Documentation

◆ Alloc()

static XrdLink * XrdLinkCtl::Alloc ( XrdNetAddr peer,
int  opts = 0 
)
static

◆ fd2link() [1/2]

static XrdLink * XrdLinkCtl::fd2link ( int  fd)
inlinestatic

Translate a file descriptor number to the corresponding link object.

Parameters
fdThe file descriptor number.
Returns
!0 Pointer to the link object. =0 The file descriptor is not associated with a link.

References LinkBat, LinkTab, and LTLast.

◆ fd2link() [2/2]

static XrdLink * XrdLinkCtl::fd2link ( int  fd,
unsigned int  inst 
)
inlinestatic

Translate a file descriptor number and an instance to a link object.

Parameters
fdThe file descriptor number.
instThe file descriptor number instance number.
Returns
!0 Pointer to the link object. =0 The file descriptor instance is not associated with a link.

References XrdLink::Instance, LinkBat, LinkTab, and LTLast.

◆ fd2PollInfo()

static XrdPollInfo * XrdLinkCtl::fd2PollInfo ( int  fd)
inlinestatic

Translate a file descriptor number to the corresponding PollInfo object.

Parameters
fdThe file descriptor number.
Returns
!0 Pointer to the PollInfo object. =0 The file descriptor is not associated with a link.

References LinkBat, LinkTab, LTLast, and XrdLinkXeq::PollInfo.

◆ Find()

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

Find the next link matching certain attributes.

Parameters
currIs an internal tracking value that allows repeated calls. It must be set to a value of 0 or less on the initial call and not touched therafter unless a null pointer is returned.
whoIf the object use to check if teh link matches the wanted criterea (typically, client name and host name). If the ppointer is nil, the next link is always returned.
Returns
!0 Pointer to the link object that matches the criterea. The link's reference counter is increased to prevent it from being reused. A subsequent call will reduce the number. =0 No more links exist with the specified criterea.

◆ getName()

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

Find the next client name matching certain attributes.

Parameters
currIs an internal tracking value that allows repeated calls. It must be set to a value of 0 or less on the initial call and not touched therafter unless zero is returned.
bnamePointer to a buffer where the name is to be returned.
blenThe length of the buffer.
whoIf the object use to check if the link matches the wanted criterea (typically, client name and host name). If the pointer is nil, a match always occurs.
Returns
!0 The length of the name placed in the buffer. =0 No more links exist with the specified criterea.

◆ idleScan()

static void XrdLinkCtl::idleScan ( )
static

Look for idle links and close hem down.

◆ setKWT()

static void XrdLinkCtl::setKWT ( int  wkSec,
int  kwSec 
)
static

Set kill constants.

Parameters
wkSecSeconds to wait for kill to happed,
kwSecThe minimum number of seconds to wait after killing a connection for it to end.

◆ Setup()

static int XrdLinkCtl::Setup ( int  maxfds,
int  idlewt 
)
static

Setup link processing.

Parameters
maxfdsThe maximum number of connections to handle.
idlewtThe time interval to check for idle connections.
Returns
!0 Successful. =0 Setup failed.

◆ SyncAll()

static void XrdLinkCtl::SyncAll ( )
static

Synchronize statustics for ll links.

◆ Unhook()

static void XrdLinkCtl::Unhook ( int  fd)
static

Unhook a link from the active table of links.

Member Data Documentation

◆ killWait

short XrdLinkCtl::killWait
static

Link destruction control constants.

◆ LinkAlloc

unsigned int XrdLinkCtl::LinkAlloc
staticprivate

◆ LinkBat

char* XrdLinkCtl::LinkBat
staticprivate

Referenced by fd2link(), fd2link(), and fd2PollInfo().

◆ LinkTab

XrdLinkCtl** XrdLinkCtl::LinkTab
staticprivate

Referenced by fd2link(), fd2link(), and fd2PollInfo().

◆ LTLast

int XrdLinkCtl::LTLast
staticprivate

Referenced by fd2link(), fd2link(), and fd2PollInfo().

◆ LTMutex

XrdSysMutex XrdLinkCtl::LTMutex
staticprivate

◆ maxFD

int XrdLinkCtl::maxFD
staticprivate

◆ TraceID

const char* XrdLinkCtl::TraceID
staticprivate

◆ waitKill

short XrdLinkCtl::waitKill
static

The documentation for this class was generated from the following file: