|
xrootd
|
#include <XrdClientSock.hh>


Public Types | |
| typedef int | Sockid |
| typedef int | Sockdescr |
Public Member Functions | |
| XrdClientSock (XrdClientUrlInfo host, int windowsize=0, int fd=-1) | |
| virtual | ~XrdClientSock () |
| virtual void | BanSockDescr (Sockdescr, Sockid) |
| virtual void | UnBanSockDescr (Sockdescr) |
| void | ReinitFDTable () |
| virtual int | RecvRaw (void *buffer, int length, Sockid substreamid=-1, Sockid *usedsubstreamid=0) |
| virtual int | SendRaw (const void *buffer, int length, Sockid substreamid=0) |
| void | SetRequestTimeout (int timeout=-1) |
| virtual int | Socks4Handshake (Sockid sockid) |
| virtual void | TryConnect (bool isUnix=0) |
| virtual Sockdescr | TryConnectParallelSock (int, int, Sockid &) |
| virtual int | EstablishParallelSock (Sockid, Sockid) |
| virtual int | RemoveParallelSock (Sockid) |
| virtual Sockid | GetSockIdHint (int) |
| virtual void | Disconnect () |
| bool | IsConnected () |
| virtual int | GetSockIdCount () |
| virtual void | PauseSelectOnSubstream (Sockid) |
| virtual void | RestartSelectOnSubstream (Sockid) |
Protected Member Functions | |
| virtual int | SaveSocket () |
| void | SetInterrupt (int which=0) |
| int | TryConnect_low (bool isUnix=0, int altport=0, int windowsz=0) |
| virtual int | SendRaw_sock (const void *buffer, int length, Sockdescr sock) |
Protected Attributes | |
| int | fRequestTimeout |
| XrdClientSockConnectParms | fHost |
| bool | fConnected |
| bool | fRDInterrupt |
| bool | fWRInterrupt |
| bool | fReinit_fd |
Private Attributes | |
| int | fSocket |
Friends | |
| class | XrdClientPhyConnection |
| typedef int XrdClientSock::Sockdescr |
| typedef int XrdClientSock::Sockid |
| XrdClientSock::XrdClientSock | ( | XrdClientUrlInfo | host, |
| int | windowsize = 0, |
||
| int | fd = -1 |
||
| ) |
Construct a socket helper
| host | Remote location to connect to |
| windowSize | TCP window size: 0 for OS defaults or the ENV setting |
| fd | A descriptor pointing to an already connected socket, -1 if not available |
References fHost, XrdClientSockConnectParms::TcpHost, XrdClientSockConnectParms::TcpWindowSize, fRDInterrupt, fWRInterrupt, fSocket, fConnected, TRUE, FALSE, fRequestTimeout, EnvGetLong, and NAME_REQUESTTIMEOUT.
| XrdClientSock::~XrdClientSock | ( | ) | [virtual] |
References Disconnect().
Reimplemented in XrdClientPSock.
Referenced by XrdClientPhyConnection::BanSockDescr().
| void XrdClientSock::Disconnect | ( | ) | [virtual] |
Reimplemented in XrdClientPSock.
References fSocket, close, and fConnected.
Referenced by XrdClientPhyConnection::Disconnect(), ~XrdClientSock(), and TryConnect().
Reimplemented in XrdClientPSock.
Referenced by XrdClientPhyConnection::EstablishPendingParallelStream().
| virtual int XrdClientSock::GetSockIdCount | ( | ) | [inline, virtual] |
Reimplemented in XrdClientPSock.
Referenced by XrdClientPhyConnection::GetSockIdCount().
| virtual Sockid XrdClientSock::GetSockIdHint | ( | int | ) | [inline, virtual] |
Reimplemented in XrdClientPSock.
Referenced by XrdClientPhyConnection::GetSockIdHint().
| bool XrdClientSock::IsConnected | ( | ) | [inline] |
References fConnected.
Referenced by XrdClientPhyConnection::Connect(), XrdClientPhyConnection::ReadRaw(), XrdClientPhyConnection::WriteRaw(), and XrdClientPhyConnection::IsValid().
| virtual void XrdClientSock::PauseSelectOnSubstream | ( | Sockid | ) | [inline, virtual] |
Reimplemented in XrdClientPSock.
Referenced by XrdClientPhyConnection::PauseSelectOnSubstream().
| int XrdClientSock::RecvRaw | ( | void * | buffer, |
| int | length, | ||
| Sockid | substreamid = -1, |
||
| Sockid * | usedsubstreamid = 0 |
||
| ) | [virtual] |
Reimplemented in XrdClientPSock.
References fSocket, Error, TXSOCK_ERR, pollfd::fd, pollfd::events, POLLIN, fRequestTimeout, poll(), fRDInterrupt, fConnected, FALSE, DebugLevel, XrdClientDebug::kDUMPDEBUG, Info, XrdClientDebug::kNODEBUG, fHost, XrdClientSockConnectParms::TcpHost, XrdClientUrlInfo::Host, XrdClientUrlInfo::Port, TXSOCK_ERR_TIMEOUT, TXSOCK_ERR_INTERRUPT, pollfd::revents, POLLPRI, EWOULDBLOCK, POLLERR, POLLHUP, and POLLNVAL.
Referenced by XrdClientPhyConnection::ReadRaw(), and Socks4Handshake().
| void XrdClientSock::ReinitFDTable | ( | ) | [inline] |
References fReinit_fd.
Referenced by XrdClientPhyConnection::ReinitFDTable(), and XrdClientPSock::RecvRaw().
| virtual int XrdClientSock::RemoveParallelSock | ( | Sockid | ) | [inline, virtual] |
Reimplemented in XrdClientPSock.
Referenced by XrdClientPhyConnection::RemoveParallelStream().
| virtual void XrdClientSock::RestartSelectOnSubstream | ( | Sockid | ) | [inline, virtual] |
Reimplemented in XrdClientPSock.
Referenced by XrdClientPhyConnection::RestartSelectOnSubstream().
| virtual int XrdClientSock::SaveSocket | ( | ) | [inline, protected, virtual] |
Reimplemented in XrdClientPSock.
References fSocket, fConnected, fRDInterrupt, and fWRInterrupt.
Referenced by XrdClientPhyConnection::SaveSocket().
| int XrdClientSock::SendRaw | ( | const void * | buffer, |
| int | length, | ||
| Sockid | substreamid = 0 |
||
| ) | [virtual] |
Reimplemented in XrdClientPSock.
References SendRaw_sock(), and fSocket.
Referenced by XrdClientPhyConnection::WriteRaw(), and Socks4Handshake().
| int XrdClientSock::SendRaw_sock | ( | const void * | buffer, |
| int | length, | ||
| Sockdescr | sock | ||
| ) | [protected, virtual] |
References pollfd::fd, pollfd::events, POLLOUT, POLLERR, POLLHUP, POLLNVAL, fRequestTimeout, poll(), fConnected, TXSOCK_ERR, fWRInterrupt, Error, fHost, XrdClientSockConnectParms::TcpHost, XrdClientUrlInfo::Host, XrdClientUrlInfo::Port, TXSOCK_ERR_TIMEOUT, TXSOCK_ERR_INTERRUPT, pollfd::revents, EWOULDBLOCK, and sleep.
Referenced by SendRaw().
| void XrdClientSock::SetInterrupt | ( | int | which = 0 | ) | [inline, protected] |
References fRDInterrupt, and fWRInterrupt.
Referenced by XrdClientPhyConnection::SetInterrupt().
| void XrdClientSock::SetRequestTimeout | ( | int | timeout = -1 | ) |
References fRequestTimeout, EnvGetLong, and NAME_REQUESTTIMEOUT.
| int XrdClientSock::Socks4Handshake | ( | Sockid | sockid | ) | [virtual] |
References XrdMonCtrCollector::port, fHost, XrdClientSockConnectParms::TcpHost, XrdClientUrlInfo::Port, XrdClientUrlInfo::HostAddr, XrdOucString::c_str(), XrdOucUtils::UserName(), SendRaw(), and RecvRaw().
Referenced by TryConnect().
| void XrdClientSock::TryConnect | ( | bool | isUnix = 0 | ) | [virtual] |
Reimplemented in XrdClientPSock.
References fConnected, fSocket, TryConnect_low(), EnvGetString, NAME_SOCKS4HOST, Info, XrdClientDebug::kHIDEBUG, Socks4Handshake(), and Disconnect().
Referenced by XrdClientPhyConnection::Connect().
| int XrdClientSock::TryConnect_low | ( | bool | isUnix = 0, |
| int | altport = 0, |
||
| int | windowsz = 0 |
||
| ) | [protected] |
References XrdMonCtrCollector::port, EnvGetLong, NAME_DFLTTCPWINDOWSIZE, EnvGetString, NAME_SOCKS4HOST, NAME_SOCKS4PORT, XrdOucString::length(), fHost, XrdClientSockConnectParms::TcpHost, XrdClientUrlInfo::HostAddr, XrdClientUrlInfo::Port, Info, XrdClientDebug::kHIDEBUG, XrdClientUrlInfo::Host, NAME_CONNECTTIMEOUT, XrdOucString::c_str(), XrdClientUrlInfo::File, fConnected, TRUE, Error, NAME_ENABLE_TCP_KEEPALIVE, XrdNetSocket::setOpts(), XRDNET_KEEPALIVE, NAME_TCP_KEEPALIVE_TIME, NAME_TCP_KEEPALIVE_INTERVAL, and NAME_TCP_KEEPALIVE_PROBES.
Referenced by XrdClientPSock::TryConnect(), XrdClientPSock::TryConnectParallelSock(), and TryConnect().
Reimplemented in XrdClientPSock.
Referenced by XrdClientPhyConnection::TryConnectParallelStream().
| virtual void XrdClientSock::UnBanSockDescr | ( | Sockdescr | ) | [inline, virtual] |
Reimplemented in XrdClientPSock.
Referenced by XrdClientPhyConnection::UnBanSockDescr().
friend class XrdClientPhyConnection [friend] |
Reimplemented in XrdClientPSock.
bool XrdClientSock::fConnected [protected] |
XrdClientSockConnectParms XrdClientSock::fHost [protected] |
Referenced by XrdClientSock(), RecvRaw(), SendRaw_sock(), TryConnect_low(), and Socks4Handshake().
bool XrdClientSock::fRDInterrupt [protected] |
Referenced by XrdClientPSock::RecvRaw(), XrdClientPSock::SaveSocket(), XrdClientSock(), RecvRaw(), SaveSocket(), and SetInterrupt().
bool XrdClientSock::fReinit_fd [protected] |
Referenced by XrdClientPSock::XrdClientPSock(), XrdClientPSock::RecvRaw(), and ReinitFDTable().
int XrdClientSock::fRequestTimeout [protected] |
Referenced by XrdClientSock(), SetRequestTimeout(), RecvRaw(), and SendRaw_sock().
int XrdClientSock::fSocket [private] |
Referenced by XrdClientPhyConnection::GetSocket(), XrdClientSock(), Disconnect(), RecvRaw(), SendRaw(), TryConnect(), and SaveSocket().
bool XrdClientSock::fWRInterrupt [protected] |
Referenced by XrdClientPSock::SaveSocket(), XrdClientSock(), SendRaw_sock(), SaveSocket(), and SetInterrupt().
1.7.5