xrootd
Classes | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
XrdClientConn Class Reference

#include <XrdClientConn.hh>

Collaboration diagram for XrdClientConn:
Collaboration graph
[legend]

Classes

struct  SessionIDInfo
 

Public Types

enum  ESrvErrorHandlerRetval {
  kSEHRReturnMsgToCaller = 0, kSEHRBreakLoop = 1, kSEHRContinue = 2, kSEHRReturnNoMsgToCaller = 3,
  kSEHRRedirLimitReached = 4
}
 
enum  EThreeStateReadHandler { kTSRHReturnMex = 0, kTSRHReturnNullMex = 1, kTSRHContinue = 2 }
 

Public Member Functions

 XrdClientConn ()
 
virtual ~XrdClientConn ()
 
bool CacheWillFit (long long bytes)
 
bool CheckHostDomain (XrdOucString hostToCheck)
 
short Connect (XrdClientUrlInfo Host2Conn, XrdClientAbsUnsolMsgHandler *unsolhandler)
 
void Disconnect (bool ForcePhysicalDisc)
 
virtual bool GetAccessToSrv ()
 
XReqErrorType GoBackToRedirector ()
 
XrdOucString GetClientHostDomain ()
 
long GetDataFromCache (const void *buffer, long long begin_offs, long long end_offs, bool PerfCalc, XrdClientIntvList &missingblks, long &outstandingblks)
 
bool SubmitDataToCache (XrdClientMessage *xmsg, long long begin_offs, long long end_offs)
 
bool SubmitRawDataToCache (const void *buffer, long long begin_offs, long long end_offs)
 
void SubmitPlaceholderToCache (long long begin_offs, long long end_offs)
 
void RemoveAllDataFromCache (bool keepwriteblocks=true)
 
void RemoveDataFromCache (long long begin_offs, long long end_offs, bool remove_overlapped=false)
 
void RemovePlaceholdersFromCache ()
 
void PrintCache ()
 
bool GetCacheInfo (int &size, long long &bytessubmitted, long long &byteshit, long long &misscount, float &missrate, long long &readreqcnt, float &bytesusefulness)
 
void SetCacheSize (int CacheSize)
 
void SetCacheRmPolicy (int RmPolicy)
 
void UnPinCacheBlk (long long begin_offs, long long end_offs)
 
int GetLogConnID () const
 
ERemoteServerType GetServerType () const
 
kXR_unt16 GetStreamID () const
 
XrdClientUrlInfoGetLBSUrl ()
 
XrdClientUrlInfoGetMetaUrl ()
 
XrdClientUrlInfo GetCurrentUrl ()
 
XrdClientUrlInfo GetRedirUrl ()
 
XErrorCode GetOpenError () const
 
virtual XReqErrorType GoToAnotherServer (XrdClientUrlInfo &newdest)
 
virtual XReqErrorType GoToMetaManager ()
 
bool IsConnected () const
 
bool IsPhyConnConnected ()
 
void ClearLastServerError ()
 
UnsolRespProcResult ProcessAsynResp (XrdClientMessage *unsolmsg)
 
virtual bool SendGenCommand (ClientRequest *req, const void *reqMoreData, void **answMoreDataAllocated, void *answMoreData, bool HasToAlloc, char *CmdName, int substreamid=0)
 
int GetOpenSockFD () const
 
void SetClientHostDomain (const char *src)
 
void SetConnected (bool conn)
 
void SetOpenError (XErrorCode err)
 
int GetParallelStreamToUse (int reqsperstream)
 
int GetParallelStreamCount ()
 
void SetRedirHandler (XrdClientAbs *rh)
 
void SetRequestedDestHost (char *newh, kXR_int32 port)
 
void SetREQPauseState (kXR_int32 wsec)
 
void SetREQDelayedConnectState (kXR_int32 wsec)
 
void SetSID (kXR_char *sid)
 
void SetUrl (XrdClientUrlInfo thisUrl)
 
XReqErrorType WriteToServer_Async (ClientRequest *req, const void *reqMoreData, int substreamid=0)
 
void GetSessionID (SessionIDInfo &sess)
 
long GetServerProtocol ()
 
short GetMaxRedirCnt () const
 
void SetMaxRedirCnt (short mx)
 
short GetRedirCnt () const
 
bool DoWriteSoftCheckPoint ()
 
bool DoWriteHardCheckPoint ()
 
void UnPinCacheBlk ()
 
void SetOpTimeLimit (int delta_secs)
 
bool IsOpTimeLimitElapsed (time_t timenow)
 

Static Public Member Functions

static XrdClientPhyConnectionGetPhyConn (int LogConnID)
 
static XrdClientConnectionMgrGetConnectionMgr ()
 
static void DelSessionIDRepo ()
 

Public Attributes

int fLastDataBytesRecv
 
int fLastDataBytesSent
 
XErrorCode fOpenError
 
XrdOucString fRedirOpaque
 
struct ServerResponseHeader LastServerResp
 
struct ServerResponseBody_Error LastServerError
 
XrdOucString fRedirCGI
 

Protected Member Functions

void SetLogConnID (int cid)
 
void SetStreamID (kXR_unt16 sid)
 

Protected Attributes

XrdClientAbsUnsolMsgHandlerfUnsolMsgHandler
 
XrdClientUrlInfo fUrl
 
XrdClientUrlInfofLBSUrl
 
XrdClientUrlInfo fREQUrl
 
short fGlobalRedirCnt
 

Private Member Functions

bool CheckErrorStatus (XrdClientMessage *, short &, char *)
 
void CheckPort (int &port)
 
void CheckREQPauseState ()
 
void CheckREQConnectWaitState ()
 
bool CheckResp (struct ServerResponseHeader *resp, const char *method)
 
XrdClientMessageClientServerCmd (ClientRequest *req, const void *reqMoreData, void **answMoreDataAllocated, void *answMoreData, bool HasToAlloc, int substreamid=0)
 
XrdSecProtocolDoAuthentication (char *plist, int plsiz)
 
ERemoteServerType DoHandShake (short log)
 
bool DoLogin ()
 
bool DomainMatcher (XrdOucString dom, XrdOucString domlist)
 
XrdOucString GetDomainToMatch (XrdOucString hostname)
 
ESrvErrorHandlerRetval HandleServerError (XReqErrorType &, XrdClientMessage *, ClientRequest *)
 
bool MatchStreamid (struct ServerResponseHeader *ServerResponse)
 
bool PanicClose ()
 
XrdOucString ParseDomainFromHostname (XrdOucString hostname)
 
XrdClientMessageReadPartialAnswer (XReqErrorType &, size_t &, ClientRequest *, bool, void **, EThreeStateReadHandler &)
 
XReqErrorType WriteToServer (ClientRequest *req, const void *reqMoreData, short LogConnID, int substreamid=0)
 
bool WaitResp (int secsmax)
 

Private Attributes

bool fConnected
 
bool fGettingAccessToSrv
 
time_t fGlobalRedirLastUpdateTimestamp
 
int fLogConnID
 
kXR_unt16 fPrimaryStreamid
 
short fMaxGlobalRedirCnt
 
XrdClientReadCachefMainReadCache
 
time_t fOpTimeLimit
 
XrdClientAbsfRedirHandler
 
XrdOucString fRedirInternalToken
 
XrdSysCondVarfREQWaitResp
 
ServerResponseBody_Attn_asynrespfREQWaitRespData
 
time_t fREQWaitTimeLimit
 
XrdSysCondVarfREQWait
 
time_t fREQConnectWaitTimeLimit
 
XrdSysCondVarfREQConnectWait
 
long fServerProto
 
ERemoteServerType fServerType
 
SessionIDInfo mySessionID
 
int fOpenSockFD
 
XrdSysCondVarfWriteWaitAck
 
XrdClientVector< ClientRequestfWriteReqsToRetry
 
XrdClientUrlInfofMetaUrl
 
bool fLBSIsMeta
 

Static Private Attributes

static XrdOucString fgClientHostDomain
 
static XrdSysMutex fSessionIDRMutex
 
static XrdOucHash< SessionIDInfofSessionIDRepo
 
static XrdClientConnectionMgrfgConnectionMgr
 

Member Enumeration Documentation

◆ ESrvErrorHandlerRetval

Enumerator
kSEHRReturnMsgToCaller 
kSEHRBreakLoop 
kSEHRContinue 
kSEHRReturnNoMsgToCaller 
kSEHRRedirLimitReached 

◆ EThreeStateReadHandler

Enumerator
kTSRHReturnMex 
kTSRHReturnNullMex 
kTSRHContinue 

Constructor & Destructor Documentation

◆ XrdClientConn()

XrdClientConn::XrdClientConn ( )

◆ ~XrdClientConn()

virtual XrdClientConn::~XrdClientConn ( )
virtual

Member Function Documentation

◆ CacheWillFit()

bool XrdClientConn::CacheWillFit ( long long  bytes)
inline

◆ CheckErrorStatus()

bool XrdClientConn::CheckErrorStatus ( XrdClientMessage ,
short &  ,
char *   
)
private

◆ CheckHostDomain()

bool XrdClientConn::CheckHostDomain ( XrdOucString  hostToCheck)

◆ CheckPort()

void XrdClientConn::CheckPort ( int &  port)
private

◆ CheckREQConnectWaitState()

void XrdClientConn::CheckREQConnectWaitState ( )
private

◆ CheckREQPauseState()

void XrdClientConn::CheckREQPauseState ( )
private

◆ CheckResp()

bool XrdClientConn::CheckResp ( struct ServerResponseHeader resp,
const char *  method 
)
private

◆ ClearLastServerError()

void XrdClientConn::ClearLastServerError ( )
inline

◆ ClientServerCmd()

XrdClientMessage* XrdClientConn::ClientServerCmd ( ClientRequest req,
const void *  reqMoreData,
void **  answMoreDataAllocated,
void *  answMoreData,
bool  HasToAlloc,
int  substreamid = 0 
)
private

◆ Connect()

short XrdClientConn::Connect ( XrdClientUrlInfo  Host2Conn,
XrdClientAbsUnsolMsgHandler unsolhandler 
)

◆ DelSessionIDRepo()

static void XrdClientConn::DelSessionIDRepo ( )
inlinestatic

◆ Disconnect()

void XrdClientConn::Disconnect ( bool  ForcePhysicalDisc)

◆ DoAuthentication()

XrdSecProtocol* XrdClientConn::DoAuthentication ( char *  plist,
int  plsiz 
)
private

◆ DoHandShake()

ERemoteServerType XrdClientConn::DoHandShake ( short  log)
private

◆ DoLogin()

bool XrdClientConn::DoLogin ( )
private

◆ DomainMatcher()

bool XrdClientConn::DomainMatcher ( XrdOucString  dom,
XrdOucString  domlist 
)
private

◆ DoWriteHardCheckPoint()

bool XrdClientConn::DoWriteHardCheckPoint ( )

◆ DoWriteSoftCheckPoint()

bool XrdClientConn::DoWriteSoftCheckPoint ( )

◆ GetAccessToSrv()

virtual bool XrdClientConn::GetAccessToSrv ( )
virtual

◆ GetCacheInfo()

bool XrdClientConn::GetCacheInfo ( int &  size,
long long &  bytessubmitted,
long long &  byteshit,
long long &  misscount,
float &  missrate,
long long &  readreqcnt,
float &  bytesusefulness 
)
inline

◆ GetClientHostDomain()

XrdOucString XrdClientConn::GetClientHostDomain ( )
inline

References fgClientHostDomain.

◆ GetConnectionMgr()

static XrdClientConnectionMgr* XrdClientConn::GetConnectionMgr ( )
inlinestatic

References fgConnectionMgr.

◆ GetCurrentUrl()

XrdClientUrlInfo XrdClientConn::GetCurrentUrl ( )
inline

References fUrl.

◆ GetDataFromCache()

long XrdClientConn::GetDataFromCache ( const void *  buffer,
long long  begin_offs,
long long  end_offs,
bool  PerfCalc,
XrdClientIntvList missingblks,
long &  outstandingblks 
)

◆ GetDomainToMatch()

XrdOucString XrdClientConn::GetDomainToMatch ( XrdOucString  hostname)
private

◆ GetLBSUrl()

XrdClientUrlInfo* XrdClientConn::GetLBSUrl ( )
inline

References fLBSUrl.

◆ GetLogConnID()

int XrdClientConn::GetLogConnID ( ) const
inline

References fLogConnID.

◆ GetMaxRedirCnt()

short XrdClientConn::GetMaxRedirCnt ( ) const
inline

References fMaxGlobalRedirCnt.

◆ GetMetaUrl()

XrdClientUrlInfo* XrdClientConn::GetMetaUrl ( )
inline

References fMetaUrl.

◆ GetOpenError()

XErrorCode XrdClientConn::GetOpenError ( ) const
inline

References fOpenError.

◆ GetOpenSockFD()

int XrdClientConn::GetOpenSockFD ( ) const
inline

References fOpenSockFD.

◆ GetParallelStreamCount()

int XrdClientConn::GetParallelStreamCount ( )

◆ GetParallelStreamToUse()

int XrdClientConn::GetParallelStreamToUse ( int  reqsperstream)

◆ GetPhyConn()

static XrdClientPhyConnection* XrdClientConn::GetPhyConn ( int  LogConnID)
static

◆ GetRedirCnt()

short XrdClientConn::GetRedirCnt ( ) const
inline

References fGlobalRedirCnt.

◆ GetRedirUrl()

XrdClientUrlInfo XrdClientConn::GetRedirUrl ( )
inline

References fREQUrl.

◆ GetServerProtocol()

long XrdClientConn::GetServerProtocol ( )
inline

References fServerProto.

◆ GetServerType()

ERemoteServerType XrdClientConn::GetServerType ( ) const
inline

References fServerType.

◆ GetSessionID()

void XrdClientConn::GetSessionID ( SessionIDInfo sess)
inline

References mySessionID.

◆ GetStreamID()

kXR_unt16 XrdClientConn::GetStreamID ( ) const
inline

References fPrimaryStreamid.

◆ GoBackToRedirector()

XReqErrorType XrdClientConn::GoBackToRedirector ( )

◆ GoToAnotherServer()

virtual XReqErrorType XrdClientConn::GoToAnotherServer ( XrdClientUrlInfo newdest)
virtual

◆ GoToMetaManager()

virtual XReqErrorType XrdClientConn::GoToMetaManager ( )
virtual

◆ HandleServerError()

ESrvErrorHandlerRetval XrdClientConn::HandleServerError ( XReqErrorType ,
XrdClientMessage ,
ClientRequest  
)
private

◆ IsConnected()

bool XrdClientConn::IsConnected ( ) const
inline

References fConnected.

◆ IsOpTimeLimitElapsed()

bool XrdClientConn::IsOpTimeLimitElapsed ( time_t  timenow)

◆ IsPhyConnConnected()

bool XrdClientConn::IsPhyConnConnected ( )

◆ MatchStreamid()

bool XrdClientConn::MatchStreamid ( struct ServerResponseHeader ServerResponse)
private

◆ PanicClose()

bool XrdClientConn::PanicClose ( )
private

◆ ParseDomainFromHostname()

XrdOucString XrdClientConn::ParseDomainFromHostname ( XrdOucString  hostname)
private

◆ PrintCache()

void XrdClientConn::PrintCache ( )
inline

◆ ProcessAsynResp()

UnsolRespProcResult XrdClientConn::ProcessAsynResp ( XrdClientMessage unsolmsg)

◆ ReadPartialAnswer()

XrdClientMessage* XrdClientConn::ReadPartialAnswer ( XReqErrorType ,
size_t &  ,
ClientRequest ,
bool  ,
void **  ,
EThreeStateReadHandler  
)
private

◆ RemoveAllDataFromCache()

void XrdClientConn::RemoveAllDataFromCache ( bool  keepwriteblocks = true)
inline

◆ RemoveDataFromCache()

void XrdClientConn::RemoveDataFromCache ( long long  begin_offs,
long long  end_offs,
bool  remove_overlapped = false 
)
inline

◆ RemovePlaceholdersFromCache()

void XrdClientConn::RemovePlaceholdersFromCache ( )
inline

◆ SendGenCommand()

virtual bool XrdClientConn::SendGenCommand ( ClientRequest req,
const void *  reqMoreData,
void **  answMoreDataAllocated,
void *  answMoreData,
bool  HasToAlloc,
char *  CmdName,
int  substreamid = 0 
)
virtual

◆ SetCacheRmPolicy()

void XrdClientConn::SetCacheRmPolicy ( int  RmPolicy)
inline

◆ SetCacheSize()

void XrdClientConn::SetCacheSize ( int  CacheSize)
inline

◆ SetClientHostDomain()

void XrdClientConn::SetClientHostDomain ( const char *  src)
inline

References fgClientHostDomain.

◆ SetConnected()

void XrdClientConn::SetConnected ( bool  conn)
inline

References fConnected.

◆ SetLogConnID()

void XrdClientConn::SetLogConnID ( int  cid)
inlineprotected

References fLogConnID.

◆ SetMaxRedirCnt()

void XrdClientConn::SetMaxRedirCnt ( short  mx)
inline

References fMaxGlobalRedirCnt.

◆ SetOpenError()

void XrdClientConn::SetOpenError ( XErrorCode  err)
inline

References fOpenError.

◆ SetOpTimeLimit()

void XrdClientConn::SetOpTimeLimit ( int  delta_secs)

◆ SetRedirHandler()

void XrdClientConn::SetRedirHandler ( XrdClientAbs rh)
inline

References fRedirHandler.

◆ SetREQDelayedConnectState()

void XrdClientConn::SetREQDelayedConnectState ( kXR_int32  wsec)
inline

◆ SetREQPauseState()

void XrdClientConn::SetREQPauseState ( kXR_int32  wsec)
inline

◆ SetRequestedDestHost()

void XrdClientConn::SetRequestedDestHost ( char *  newh,
kXR_int32  port 
)
inline

◆ SetSID()

void XrdClientConn::SetSID ( kXR_char sid)

◆ SetStreamID()

void XrdClientConn::SetStreamID ( kXR_unt16  sid)
inlineprotected

References fPrimaryStreamid.

◆ SetUrl()

void XrdClientConn::SetUrl ( XrdClientUrlInfo  thisUrl)
inline

References fUrl.

◆ SubmitDataToCache()

bool XrdClientConn::SubmitDataToCache ( XrdClientMessage xmsg,
long long  begin_offs,
long long  end_offs 
)

◆ SubmitPlaceholderToCache()

void XrdClientConn::SubmitPlaceholderToCache ( long long  begin_offs,
long long  end_offs 
)
inline

◆ SubmitRawDataToCache()

bool XrdClientConn::SubmitRawDataToCache ( const void *  buffer,
long long  begin_offs,
long long  end_offs 
)

◆ UnPinCacheBlk() [1/2]

void XrdClientConn::UnPinCacheBlk ( )

◆ UnPinCacheBlk() [2/2]

void XrdClientConn::UnPinCacheBlk ( long long  begin_offs,
long long  end_offs 
)
inline

◆ WaitResp()

bool XrdClientConn::WaitResp ( int  secsmax)
private

◆ WriteToServer()

XReqErrorType XrdClientConn::WriteToServer ( ClientRequest req,
const void *  reqMoreData,
short  LogConnID,
int  substreamid = 0 
)
private

◆ WriteToServer_Async()

XReqErrorType XrdClientConn::WriteToServer_Async ( ClientRequest req,
const void *  reqMoreData,
int  substreamid = 0 
)

Member Data Documentation

◆ fConnected

bool XrdClientConn::fConnected
private

Referenced by IsConnected(), and SetConnected().

◆ fgClientHostDomain

XrdOucString XrdClientConn::fgClientHostDomain
staticprivate

◆ fgConnectionMgr

XrdClientConnectionMgr* XrdClientConn::fgConnectionMgr
staticprivate

Referenced by GetConnectionMgr().

◆ fGettingAccessToSrv

bool XrdClientConn::fGettingAccessToSrv
private

◆ fGlobalRedirCnt

short XrdClientConn::fGlobalRedirCnt
protected

Referenced by GetRedirCnt().

◆ fGlobalRedirLastUpdateTimestamp

time_t XrdClientConn::fGlobalRedirLastUpdateTimestamp
private

◆ fLastDataBytesRecv

int XrdClientConn::fLastDataBytesRecv

◆ fLastDataBytesSent

int XrdClientConn::fLastDataBytesSent

◆ fLBSIsMeta

bool XrdClientConn::fLBSIsMeta
private

◆ fLBSUrl

XrdClientUrlInfo* XrdClientConn::fLBSUrl
protected

Referenced by GetLBSUrl().

◆ fLogConnID

int XrdClientConn::fLogConnID
private

Referenced by GetLogConnID(), and SetLogConnID().

◆ fMainReadCache

XrdClientReadCache* XrdClientConn::fMainReadCache
private

◆ fMaxGlobalRedirCnt

short XrdClientConn::fMaxGlobalRedirCnt
private

Referenced by GetMaxRedirCnt(), and SetMaxRedirCnt().

◆ fMetaUrl

XrdClientUrlInfo* XrdClientConn::fMetaUrl
private

Referenced by GetMetaUrl().

◆ fOpenError

XErrorCode XrdClientConn::fOpenError

Referenced by GetOpenError(), and SetOpenError().

◆ fOpenSockFD

int XrdClientConn::fOpenSockFD
private

Referenced by GetOpenSockFD().

◆ fOpTimeLimit

time_t XrdClientConn::fOpTimeLimit
private

◆ fPrimaryStreamid

kXR_unt16 XrdClientConn::fPrimaryStreamid
private

Referenced by GetStreamID(), and SetStreamID().

◆ fRedirCGI

XrdOucString XrdClientConn::fRedirCGI

◆ fRedirHandler

XrdClientAbs* XrdClientConn::fRedirHandler
private

Referenced by SetRedirHandler().

◆ fRedirInternalToken

XrdOucString XrdClientConn::fRedirInternalToken
private

◆ fRedirOpaque

XrdOucString XrdClientConn::fRedirOpaque

◆ fREQConnectWait

XrdSysCondVar* XrdClientConn::fREQConnectWait
private

◆ fREQConnectWaitTimeLimit

time_t XrdClientConn::fREQConnectWaitTimeLimit
private

◆ fREQUrl

XrdClientUrlInfo XrdClientConn::fREQUrl
protected

◆ fREQWait

XrdSysCondVar* XrdClientConn::fREQWait
private

Referenced by SetREQPauseState().

◆ fREQWaitResp

XrdSysCondVar* XrdClientConn::fREQWaitResp
private

◆ fREQWaitRespData

ServerResponseBody_Attn_asynresp* XrdClientConn::fREQWaitRespData
private

◆ fREQWaitTimeLimit

time_t XrdClientConn::fREQWaitTimeLimit
private

Referenced by SetREQPauseState().

◆ fServerProto

long XrdClientConn::fServerProto
private

Referenced by GetServerProtocol().

◆ fServerType

ERemoteServerType XrdClientConn::fServerType
private

Referenced by GetServerType().

◆ fSessionIDRepo

XrdOucHash<SessionIDInfo> XrdClientConn::fSessionIDRepo
staticprivate

Referenced by DelSessionIDRepo().

◆ fSessionIDRMutex

XrdSysMutex XrdClientConn::fSessionIDRMutex
staticprivate

Referenced by DelSessionIDRepo().

◆ fUnsolMsgHandler

XrdClientAbsUnsolMsgHandler* XrdClientConn::fUnsolMsgHandler
protected

◆ fUrl

XrdClientUrlInfo XrdClientConn::fUrl
protected

◆ fWriteReqsToRetry

XrdClientVector<ClientRequest> XrdClientConn::fWriteReqsToRetry
private

◆ fWriteWaitAck

XrdSysCondVar* XrdClientConn::fWriteWaitAck
private

Referenced by UnPinCacheBlk().

◆ LastServerError

struct ServerResponseBody_Error XrdClientConn::LastServerError

Referenced by ClearLastServerError().

◆ LastServerResp

struct ServerResponseHeader XrdClientConn::LastServerResp

◆ mySessionID

SessionIDInfo XrdClientConn::mySessionID
private

Referenced by GetSessionID().


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