xrootd
|
#include <XrdClientPSock.hh>
Public Member Functions | |
XrdClientPSock (XrdClientUrlInfo host, int windowsize=0) | |
virtual | ~XrdClientPSock () |
void | BanSockDescr (Sockdescr s, Sockid newid) |
void | UnBanSockDescr (Sockdescr s) |
virtual int | RecvRaw (void *buffer, int length, Sockid substreamid=-1, Sockid *usedsubstreamid=0) |
virtual int | SendRaw (const void *buffer, int length, Sockid substreamid=0) |
virtual void | TryConnect (bool isUnix=0) |
virtual Sockdescr | TryConnectParallelSock (int port, int windowsz, Sockid &tmpid) |
virtual int | EstablishParallelSock (Sockid tmpsockid, Sockid newsockid) |
virtual void | Disconnect () |
virtual int | RemoveParallelSock (Sockid sockid) |
virtual Sockid | GetSockIdHint (int reqsperstream) |
virtual int | GetSockIdCount () |
virtual void | PauseSelectOnSubstream (Sockid substreamid) |
virtual void | RestartSelectOnSubstream (Sockid substreamid) |
Protected Member Functions | |
virtual int | SaveSocket () |
Private Member Functions | |
Sockdescr | GetSock (Sockid id) |
Sockdescr | GetMainSock () |
Sockid | GetSockId (Sockdescr sock) |
Private Attributes | |
XrdSysRecMutex | fMutex |
fdinfo | globalfdinfo |
Sockid | lastsidhint |
XrdClientVector< Sockid > | fSocketIdRepo |
XrdOucRash< Sockid, Sockdescr > | fSocketPool |
XrdOucRash< Sockdescr, Sockid > | fSocketNYHandshakedIdPool |
XrdOucRash< Sockdescr, Sockid > | fSocketIdPool |
Friends | |
class | XrdClientPhyConnection |
XrdClientPSock::XrdClientPSock | ( | XrdClientUrlInfo | host, |
int | windowsize = 0 |
||
) |
References XrdClientSock::fReinit_fd, and lastsidhint.
XrdClientPSock::~XrdClientPSock | ( | ) | [virtual] |
References Disconnect().
Reimplemented from XrdClientSock.
References fMutex, fSocketNYHandshakedIdPool, and XrdOucRash< K, V >::Rep().
Referenced by TryConnectParallelSock().
void XrdClientPSock::Disconnect | ( | ) | [virtual] |
Reimplemented from XrdClientSock.
References XrdOucRash< K, V >::Apply(), XrdClientVector< T >::Clear(), CloseSockFunc(), FALSE, XrdClientSock::fConnected, fMutex, fSocketIdPool, fSocketIdRepo, fSocketPool, and XrdOucRash< K, V >::Purge().
Referenced by ~XrdClientPSock().
Reimplemented from XrdClientSock.
References XrdOucRash< K, V >::Del(), fMutex, fSocketIdPool, fSocketIdRepo, fSocketPool, GetSock(), Info, XrdClientDebug::kUSERDEBUG, XrdClientVector< T >::Push_back(), and XrdOucRash< K, V >::Rep().
Sockdescr XrdClientPSock::GetMainSock | ( | ) | [inline, private] |
References GetSock().
Referenced by RecvRaw(), and TryConnect().
References XrdOucRash< K, V >::Find(), fMutex, and fSocketPool.
Referenced by EstablishParallelSock(), GetMainSock(), PauseSelectOnSubstream(), RecvRaw(), RemoveParallelSock(), RestartSelectOnSubstream(), and SendRaw().
References XrdOucRash< K, V >::Find(), fMutex, and fSocketIdPool.
Referenced by RecvRaw().
virtual int XrdClientPSock::GetSockIdCount | ( | ) | [inline, virtual] |
Reimplemented from XrdClientSock.
References fMutex, fSocketPool, and XrdOucRash< K, V >::Num().
int XrdClientPSock::GetSockIdHint | ( | int | reqsperstream | ) | [virtual] |
Reimplemented from XrdClientSock.
References fMutex, fSocketIdRepo, XrdClientVector< T >::GetSize(), and lastsidhint.
void XrdClientPSock::PauseSelectOnSubstream | ( | Sockid | substreamid | ) | [virtual] |
Reimplemented from XrdClientSock.
References fdinfo::fdset, fMutex, GetSock(), and globalfdinfo.
int XrdClientPSock::RecvRaw | ( | void * | buffer, |
int | length, | ||
Sockid | substreamid = -1 , |
||
Sockid * | usedsubstreamid = 0 |
||
) | [virtual] |
Reimplemented from XrdClientSock.
References XrdOucRash< K, V >::Apply(), FdSetSockFuncPars::banned, EnvGetLong, Error, EWOULDBLOCK, XrdClientSock::fConnected, FdSetSockFuncPars::fdnfo, fdinfo::fdset, FdSetSockFunc(), fMutex, XrdClientSock::fRDInterrupt, XrdClientSock::fReinit_fd, fSocketNYHandshakedIdPool, fSocketPool, GetMainSock(), GetSock(), GetSockId(), globalfdinfo, Info, XrdClientDebug::kDUMPDEBUG, fdinfo::maxfd, NAME_REQUESTTIMEOUT, XrdClientSock::ReinitFDTable(), RemoveParallelSock(), TXSOCK_ERR, TXSOCK_ERR_INTERRUPT, and TXSOCK_ERR_TIMEOUT.
int XrdClientPSock::RemoveParallelSock | ( | Sockid | sockid | ) | [virtual] |
Reimplemented from XrdClientSock.
References close, XrdOucRash< K, V >::Del(), XrdClientVector< T >::Erase(), fMutex, fSocketIdPool, fSocketIdRepo, fSocketPool, XrdClientVector< T >::GetSize(), and GetSock().
Referenced by RecvRaw().
void XrdClientPSock::RestartSelectOnSubstream | ( | Sockid | substreamid | ) | [virtual] |
Reimplemented from XrdClientSock.
References fdinfo::fdset, fMutex, GetSock(), and globalfdinfo.
virtual int XrdClientPSock::SaveSocket | ( | ) | [inline, protected, virtual] |
Reimplemented from XrdClientSock.
References XrdOucRash< K, V >::Del(), XrdClientSock::fConnected, XrdOucRash< K, V >::Find(), fMutex, XrdClientSock::fRDInterrupt, fSocketIdPool, fSocketPool, and XrdClientSock::fWRInterrupt.
int XrdClientPSock::SendRaw | ( | const void * | buffer, |
int | length, | ||
Sockid | substreamid = 0 |
||
) | [virtual] |
Reimplemented from XrdClientSock.
References GetSock(), Info, and XrdClientDebug::kDUMPDEBUG.
void XrdClientPSock::TryConnect | ( | bool | isUnix = 0 | ) | [virtual] |
Reimplemented from XrdClientSock.
References XrdClientSock::fConnected, fMutex, fSocketIdPool, fSocketPool, GetMainSock(), XrdOucRash< K, V >::Rep(), and XrdClientSock::TryConnect_low().
XrdClientSock::Sockdescr XrdClientPSock::TryConnectParallelSock | ( | int | port, |
int | windowsz, | ||
Sockid & | tmpid | ||
) | [virtual] |
Reimplemented from XrdClientSock.
References BanSockDescr(), fMutex, fSocketIdPool, fSocketPool, XrdOucRash< K, V >::Rep(), and XrdClientSock::TryConnect_low().
void XrdClientPSock::UnBanSockDescr | ( | Sockdescr | s | ) | [inline, virtual] |
Reimplemented from XrdClientSock.
References XrdOucRash< K, V >::Del(), fMutex, and fSocketNYHandshakedIdPool.
friend class XrdClientPhyConnection [friend] |
Reimplemented from XrdClientSock.
XrdSysRecMutex XrdClientPSock::fMutex [private] |
XrdOucRash<Sockdescr, Sockid> XrdClientPSock::fSocketIdPool [private] |
Referenced by Disconnect(), EstablishParallelSock(), GetSockId(), RemoveParallelSock(), SaveSocket(), TryConnect(), and TryConnectParallelSock().
XrdClientVector<Sockid> XrdClientPSock::fSocketIdRepo [private] |
Referenced by Disconnect(), EstablishParallelSock(), GetSockIdHint(), and RemoveParallelSock().
Referenced by BanSockDescr(), RecvRaw(), and UnBanSockDescr().
XrdOucRash<Sockid, Sockdescr> XrdClientPSock::fSocketPool [private] |
Referenced by Disconnect(), EstablishParallelSock(), GetSock(), GetSockIdCount(), RecvRaw(), RemoveParallelSock(), SaveSocket(), TryConnect(), and TryConnectParallelSock().
fdinfo XrdClientPSock::globalfdinfo [private] |
Referenced by PauseSelectOnSubstream(), RecvRaw(), and RestartSelectOnSubstream().
Sockid XrdClientPSock::lastsidhint [private] |
Referenced by GetSockIdHint(), and XrdClientPSock().