XrdLinkCtl Class Reference

#include <XrdLinkCtl.hh>

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

List of all members.

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

Constructor & Destructor Documentation

XrdLinkCtl::XrdLinkCtl (  )  [inline]

Constructor.

XrdLinkCtl::~XrdLinkCtl (  )  [inline, private]

Member Function Documentation

static XrdLink* XrdLinkCtl::Alloc ( XrdNetAddr peer,
int  opts = 0 
) [static]
static XrdLink* XrdLinkCtl::fd2link ( int  fd,
unsigned int  inst 
) [inline, static]

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

Parameters:
fd The file descriptor number.
inst The 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.

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

Translate a file descriptor number to the corresponding link object.

Parameters:
fd The 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.

static XrdPollInfo* XrdLinkCtl::fd2PollInfo ( int  fd  )  [inline, static]

Translate a file descriptor number to the corresponding PollInfo object.

Parameters:
fd The 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.

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

Find the next link matching certain attributes.

Parameters:
cur Is 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.
who If 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.

Reimplemented from XrdLink.

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

Find the next client name matching certain attributes.

Parameters:
cur Is 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.
bname Pointer to a buffer where the name is to be returned.
blen The length of the buffer.
who If 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.

Reimplemented from XrdLinkXeq.

static void XrdLinkCtl::idleScan (  )  [static]

Look for idle links and close hem down.

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

Set kill constants.

Parameters:
wksec Seconds to wait for kill to happed,
kwsec The minimum number of seconds to wait after killing a connection for it to end.
static int XrdLinkCtl::Setup ( int  maxfds,
int  idlewt 
) [static]

Setup link processing.

Parameters:
maaxfds The maximum number of connections to handle.
idlewt The time interval to check for idle connections.
Returns:
!0 Successful. =0 Setup failed.
static void XrdLinkCtl::SyncAll (  )  [static]

Synchronize statustics for ll links.

static void XrdLinkCtl::Unhook ( int  fd  )  [static]

Unhook a link from the active table of links.


Member Data Documentation

short XrdLinkCtl::killWait [static]

Link destruction control constants.

unsigned int XrdLinkCtl::LinkAlloc [static, private]
char* XrdLinkCtl::LinkBat [static, private]

Referenced by fd2link(), and fd2PollInfo().

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

Referenced by fd2link(), and fd2PollInfo().

int XrdLinkCtl::LTLast [static, private]

Referenced by fd2link(), and fd2PollInfo().

XrdSysMutex XrdLinkCtl::LTMutex [static, private]
int XrdLinkCtl::maxFD [static, private]
const char* XrdLinkCtl::TraceID [static, private]

Reimplemented from XrdLinkXeq.

short XrdLinkCtl::waitKill [static]

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 7 Jul 2020 for xrootd by  doxygen 1.6.1