xrootd
|
#include <XrdClientPhyConnection.hh>
XrdClientPhyConnection::XrdClientPhyConnection | ( | XrdClientAbsUnsolMsgHandler * | h, |
XrdClientSid * | sid | ||
) |
XrdClientPhyConnection::~XrdClientPhyConnection | ( | ) |
virtual void XrdClientPhyConnection::BanSockDescr | ( | int | sockdescr, |
int | sockid | ||
) | [inline, virtual] |
References XrdClientSock::BanSockDescr(), and fSocket.
XrdClientMessage * XrdClientPhyConnection::BuildMessage | ( | bool | IgnoreTimeouts, |
bool | Enqueue | ||
) |
References Error, fMsgQ, fSidManager, XrdClientSid::GetSidInfo(), XrdClientMessage::GetStatusCode(), HandleUnsolicited(), XrdClientMessage::HeaderSID(), XrdClientMessage::HeaderStatus(), Info, XrdClientMessage::IsAttn(), XrdClientDebug::kDUMPDEBUG, kUNSOL_KEEP, kXR_oksofar, XrdClientMessage::kXrdMSC_readerr, XrdClientMessage::kXrdMSC_timeout, XrdClientInputBuffer::PutMsg(), XrdClientMessage::ReadRaw(), XrdClientSid::ReleaseSid(), and Touch().
Referenced by SocketReaderThread().
bool XrdClientPhyConnection::CheckAutoTerm | ( | ) |
References FALSE, fMutex, fReaderthreadrunning, Info, IsValid(), XrdClientDebug::kHIDEBUG, TRUE, and UnlockChannel().
Referenced by SocketReaderThread().
bool XrdClientPhyConnection::Connect | ( | XrdClientUrlInfo | RemoteHost, |
bool | isUnix = 0 |
||
) |
Referenced by XrdClientConnectionMgr::Connect(), and ReConnect().
bool XrdClientPhyConnection::Connect | ( | XrdClientUrlInfo | RemoteHost, |
bool | isUnix, | ||
int | fd | ||
) |
Connect to a remote location
RemoteHost | address descriptor |
isUnix | true if the address points to a Unix socket |
fd | a descriptor pointing to a connected socket if the subroutine is supposed to reuse an existing connection, -1 otherwise |
References Disconnect(), EnvGetLong, Error, FALSE, XrdClientUrlInfo::File, fMutex, fReaderthreadrunning, fServer, fSocket, fTTLsec, XrdClientUrlInfo::Host, Info, XrdClientSock::IsConnected(), XrdClientDebug::kHIDEBUG, NAME_DATASERVERCONN_TTL, NAME_MULTISTREAMCNT, XrdClientUrlInfo::Port, Touch(), TRUE, and XrdClientSock::TryConnect().
void XrdClientPhyConnection::CountLogConn | ( | int | d = 1 | ) |
References fLogConnCnt, fMutex, XrdSysMutex::Lock(), and XrdSysMutex::UnLock().
Referenced by XrdClientConnectionMgr::Connect(), and XrdClientLogConnection::~XrdClientLogConnection().
void XrdClientPhyConnection::Disconnect | ( | ) |
References XrdClientSock::Disconnect(), fMutex, fSocket, Info, and XrdClientDebug::kHIDEBUG.
Referenced by Connect(), DestroyPhyConn(), DisconnectElapsedPhyConn(), HandleUnsolicited(), ReadRaw(), ReConnect(), WriteRaw(), and ~XrdClientPhyConnection().
ERemoteServerType XrdClientPhyConnection::DoHandShake | ( | ServerInitHandShake & | xbody, |
int | substreamid = 0 |
||
) |
References ConnectionManager, DebugLevel, DoHandShake(), Error, XrdClientConn::fLBSUrl, fServerProto, XrdClientConn::fServerProto, fServerType, XrdClientConn::fUrl, XrdClientLogConnection::GetPhyConnection(), XrdClientUrlInfo::GetUrl(), XrdClientUrlInfo::Host, Info, IsValid(), XrdClientDebug::kHIDEBUG, kSTBaseXrootd, kSTDataXrootd, kSTError, XrdClientDebug::kUSERDEBUG, XrdClientUrlInfo::Port, and ServerInitHandShake::protover.
Referenced by XrdClientMStream::AddParallelStream(), and DoHandShake().
int XrdClientPhyConnection::EstablishPendingParallelStream | ( | int | tmpid, |
int | newid | ||
) | [inline] |
References XrdClientSock::EstablishParallelSock(), and fSocket.
Referenced by XrdClientMStream::AddParallelStream().
bool XrdClientPhyConnection::ExpiredTTL | ( | ) |
References fLastUseTimestamp, and fTTLsec.
Referenced by DisconnectElapsedPhyConn().
short XrdClientPhyConnection::GetLogConnCnt | ( | ) | const [inline] |
References fLogConnCnt.
Referenced by DisconnectElapsedPhyConn(), and DumpPhyConn().
int XrdClientPhyConnection::GetReaderThreadsCnt | ( | ) | [inline] |
References fMutex, and fReaderthreadrunning.
XrdSecProtocol* XrdClientPhyConnection::GetSecProtocol | ( | ) | const [inline] |
References fSecProtocol.
int XrdClientPhyConnection::GetSocket | ( | ) | [inline] |
References XrdClientSock::fSocket, and fSocket.
int XrdClientPhyConnection::GetSockIdCount | ( | ) | [inline] |
References fSocket, and XrdClientSock::GetSockIdCount().
Referenced by XrdClientMStream::AddParallelStream(), and XrdClientConn::GetParallelStreamCount().
int XrdClientPhyConnection::GetSockIdHint | ( | int | reqsperstream | ) | [inline] |
References fSocket, and XrdClientSock::GetSockIdHint().
Referenced by XrdClientConn::GetParallelStreamToUse().
long XrdClientPhyConnection::GetTTL | ( | ) | [inline] |
References fTTLsec.
UnsolRespProcResult XrdClientPhyConnection::HandleUnsolicited | ( | XrdClientMessage * | m | ) | [private] |
References ServerResponseBody_Attn::actnum, Disconnect(), FALSE, fServer, XrdClientMessage::GetData(), XrdClientUrlInfo::Host, Info, XrdClientMessage::IsAttn(), XrdClientDebug::kNODEBUG, kUNSOL_CONTINUE, kXR_asyncab, kXR_asyncdi, kXR_asyncms, kXR_asyncrd, ServerResponseBody_Attn::parms, XrdClientUrlInfo::Port, XrdClientUnsolMsgSender::SendUnsolicitedMsg(), Touch(), and TRUE.
Referenced by BuildMessage().
bool XrdClientPhyConnection::IsAddress | ( | const XrdOucString & | addr | ) | [inline] |
References fServer, XrdClientUrlInfo::Host, and XrdClientUrlInfo::HostAddr.
ELoginState XrdClientPhyConnection::IsLogged | ( | ) |
References fLogged, and fMutex.
Referenced by XrdClientConn::GetAccessToSrv().
bool XrdClientPhyConnection::IsPort | ( | int | port | ) | [inline] |
References fServer, and XrdClientUrlInfo::Port.
bool XrdClientPhyConnection::IsUser | ( | const XrdOucString & | usr | ) | [inline] |
References fServer, and XrdClientUrlInfo::User.
bool XrdClientPhyConnection::IsValid | ( | ) |
References fMutex, fSocket, and XrdClientSock::IsConnected().
Referenced by XrdClientMStream::AddParallelStream(), CheckAutoTerm(), XrdClientConnectionMgr::Connect(), DisconnectElapsedPhyConn(), DoHandShake(), DumpPhyConn(), XrdClientConn::GetAccessToSrv(), XrdClientConnectionMgr::GetPhyConnection(), XrdClientConn::IsPhyConnConnected(), ReadRaw(), and WriteRaw().
void XrdClientPhyConnection::LockChannel | ( | ) |
References fRwMutex, and XrdSysMutex::Lock().
Referenced by XrdClientPhyConnLocker::XrdClientPhyConnLocker().
void XrdClientPhyConnection::PauseSelectOnSubstream | ( | int | substreamid | ) | [inline] |
References fSocket, and XrdClientSock::PauseSelectOnSubstream().
Referenced by XrdClientMessage::ReadRaw().
void XrdClientPhyConnection::ReadLock | ( | ) | [inline] |
References fMultireadMutex, and XrdSysMutex::Lock().
Referenced by XrdClientMessage::ReadRaw().
XrdClientMessage * XrdClientPhyConnection::ReadMessage | ( | int | streamid | ) |
References fMsgQ, fRequestTimeout, XrdClientInputBuffer::GetMsg(), and Touch().
Referenced by XrdClientConnectionMgr::ReadMsg().
int XrdClientPhyConnection::ReadRaw | ( | void * | buffer, |
int | BufferLength, | ||
int | substreamid = -1 , |
||
int * | usedsubstreamid = 0 |
||
) |
References DebugLevel, Disconnect(), fServer, fSocket, XrdClientUrlInfo::Host, Info, XrdClientSock::IsConnected(), IsValid(), XrdClientDebug::kDUMPDEBUG, XrdClientDebug::kHIDEBUG, XrdClientDebug::kUSERDEBUG, XrdClientUrlInfo::Port, XrdClientSock::RecvRaw(), TXSOCK_ERR, TXSOCK_ERR_TIMEOUT, and xrdmin.
Referenced by XrdClientMStream::BindPendingStream(), XrdClientMessage::ReadRaw(), and XrdClientLogConnection::ReadRaw().
void XrdClientPhyConnection::ReadUnLock | ( | ) | [inline] |
References fMultireadMutex, and XrdSysMutex::UnLock().
Referenced by XrdClientMessage::ReadRaw().
bool XrdClientPhyConnection::ReConnect | ( | XrdClientUrlInfo | RemoteHost | ) |
References Connect(), and Disconnect().
void XrdClientPhyConnection::ReinitFDTable | ( | ) | [inline] |
References fSocket, and XrdClientSock::ReinitFDTable().
Referenced by XrdClientMStream::AddParallelStream().
void XrdClientPhyConnection::RemoveParallelStream | ( | int | substreamid | ) | [inline] |
References fSocket, and XrdClientSock::RemoveParallelSock().
Referenced by XrdClientMStream::RemoveParallelStream().
void XrdClientPhyConnection::RestartSelectOnSubstream | ( | int | substreamid | ) | [inline] |
References fSocket, and XrdClientSock::RestartSelectOnSubstream().
Referenced by XrdClientMessage::ReadRaw().
int XrdClientPhyConnection::SaveSocket | ( | ) | [inline] |
References fSocket, fTTLsec, and XrdClientSock::SaveSocket().
Referenced by XrdClientConn::GetAccessToSrv().
void XrdClientPhyConnection::SetInterrupt | ( | ) | [inline] |
References fSocket, and XrdClientSock::SetInterrupt().
void XrdClientPhyConnection::SetLogged | ( | ELoginState | status | ) | [inline] |
References fLogged.
Referenced by XrdClientConn::DoLogin(), and XrdClientPhyConnection().
void XrdClientPhyConnection::SetSecProtocol | ( | XrdSecProtocol * | sp | ) | [inline] |
References fSecProtocol.
Referenced by XrdClientConn::DoLogin().
void XrdClientPhyConnection::SetTTL | ( | long | ttl | ) | [inline] |
References fTTLsec.
Referenced by XrdClientConn::GetAccessToSrv().
void XrdClientPhyConnection::StartedReader | ( | ) |
References fMutex, fReaderCV, fReaderthreadrunning, and XrdSysSemWait::Post().
Referenced by SocketReaderThread().
void XrdClientPhyConnection::StartReader | ( | ) |
References Error, fMutex, fReaderCV, fReaderthreadhandler, fReaderthreadrunning, fServerType, Info, XrdClientDebug::kHIDEBUG, kSTBaseXrootd, READERCOUNT, SocketReaderThread(), and XrdSysSemWait::Wait().
Referenced by XrdClientConn::GetAccessToSrv().
bool XrdClientPhyConnection::TestAndSetMStreamsGoing | ( | ) |
References fMStreamsGoing, and fMutex.
Referenced by XrdClientMStream::EstablishParallelStreams().
void XrdClientPhyConnection::Touch | ( | ) |
References fLastUseTimestamp, and fMutex.
Referenced by BuildMessage(), Connect(), XrdClientConnectionMgr::Connect(), DestroyPhyConn(), DisconnectElapsedPhyConn(), HandleUnsolicited(), ReadMessage(), WriteRaw(), and XrdClientPhyConnection().
int XrdClientPhyConnection::TryConnectParallelStream | ( | int | port, |
int | windowsz, | ||
int | sockid | ||
) | [inline] |
References fSocket, and XrdClientSock::TryConnectParallelSock().
Referenced by XrdClientMStream::AddParallelStream().
virtual void XrdClientPhyConnection::UnBanSockDescr | ( | int | sockdescr | ) | [inline, virtual] |
References fSocket, and XrdClientSock::UnBanSockDescr().
Referenced by XrdClientMStream::AddParallelStream().
void XrdClientPhyConnection::UnlockChannel | ( | ) |
References fRwMutex, and XrdSysMutex::UnLock().
Referenced by CheckAutoTerm(), ~XrdClientPhyConnection(), and XrdClientPhyConnLocker::~XrdClientPhyConnLocker().
int XrdClientPhyConnection::WipeStreamid | ( | int | streamid | ) | [inline] |
References fMsgQ, and XrdClientInputBuffer::WipeStreamid().
Referenced by XrdClientConnectionMgr::Connect().
int XrdClientPhyConnection::WriteRaw | ( | const void * | buffer, |
int | BufferLength, | ||
int | substreamid = 0 |
||
) |
References Disconnect(), fServer, fSocket, XrdClientUrlInfo::Host, Info, XrdClientSock::IsConnected(), IsValid(), XrdClientDebug::kDUMPDEBUG, XrdClientDebug::kHIDEBUG, XrdClientDebug::kUSERDEBUG, XrdClientUrlInfo::Port, XrdClientSock::SendRaw(), Touch(), TXSOCK_ERR, and TXSOCK_ERR_TIMEOUT.
Referenced by XrdClientMStream::BindPendingStream(), and XrdClientLogConnection::WriteRaw().
time_t XrdClientPhyConnection::fLastUseTimestamp [private] |
Referenced by ExpiredTTL(), and Touch().
short XrdClientPhyConnection::fLogConnCnt [private] |
Referenced by CountLogConn(), and GetLogConnCnt().
enum ELoginState XrdClientPhyConnection::fLogged [private] |
Referenced by IsLogged(), and SetLogged().
Referenced by BuildMessage(), ReadMessage(), and WipeStreamid().
bool XrdClientPhyConnection::fMStreamsGoing [private] |
Referenced by TestAndSetMStreamsGoing().
Referenced by ReadLock(), and ReadUnLock().
XrdSysRecMutex XrdClientPhyConnection::fMutex [private] |
Referenced by CheckAutoTerm(), Connect(), CountLogConn(), Disconnect(), GetReaderThreadsCnt(), IsLogged(), IsValid(), StartedReader(), StartReader(), TestAndSetMStreamsGoing(), and Touch().
Referenced by StartedReader(), and StartReader().
XrdClientThread* XrdClientPhyConnection::fReaderthreadhandler[64] [private] |
Referenced by StartReader(), XrdClientPhyConnection(), and ~XrdClientPhyConnection().
int XrdClientPhyConnection::fReaderthreadrunning [private] |
Referenced by CheckAutoTerm(), Connect(), GetReaderThreadsCnt(), StartedReader(), StartReader(), XrdClientPhyConnection(), and ~XrdClientPhyConnection().
int XrdClientPhyConnection::fRequestTimeout [private] |
Referenced by ReadMessage(), and XrdClientPhyConnection().
Referenced by LockChannel(), and UnlockChannel().
Referenced by GetSecProtocol(), SetSecProtocol(), XrdClientPhyConnection(), and ~XrdClientPhyConnection().
Referenced by Connect(), HandleUnsolicited(), IsAddress(), IsPort(), IsUser(), ReadRaw(), WriteRaw(), XrdClientPhyConnection(), and ~XrdClientPhyConnection().
Referenced by DoHandShake().
Referenced by DoHandShake(), StartReader(), and XrdClientPhyConnection().
XrdClientSid* XrdClientPhyConnection::fSidManager [private] |
Referenced by BuildMessage().
XrdClientSock* XrdClientPhyConnection::fSocket [private] |
Referenced by BanSockDescr(), Connect(), Disconnect(), EstablishPendingParallelStream(), GetSocket(), GetSockIdCount(), GetSockIdHint(), IsValid(), PauseSelectOnSubstream(), ReadRaw(), ReinitFDTable(), RemoveParallelStream(), RestartSelectOnSubstream(), SaveSocket(), SetInterrupt(), TryConnectParallelStream(), UnBanSockDescr(), WriteRaw(), and ~XrdClientPhyConnection().
Referenced by Connect(), ExpiredTTL(), GetTTL(), SaveSocket(), SetTTL(), and XrdClientPhyConnection().