#include <XrdClientSock.hh>
Inheritance diagram for XrdClientSock:
Public Types | |
typedef int | Sockid |
typedef int | Sockdescr |
Public Member Functions | |
XrdClientSock (XrdClientUrlInfo host, int windowsize=0) | |
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 |
Definition at line 30 of file XrdClientSock.hh.
typedef int XrdClientSock::Sockid |
Definition at line 32 of file XrdClientSock.hh.
typedef int XrdClientSock::Sockdescr |
Definition at line 33 of file XrdClientSock.hh.
XrdClientSock::XrdClientSock | ( | XrdClientUrlInfo | host, | |
int | windowsize = 0 | |||
) |
Definition at line 45 of file XrdClientSock.cc.
References EnvGetLong, FALSE, fConnected, fHost, fRDInterrupt, fRequestTimeout, fSocket, fWRInterrupt, NAME_REQUESTTIMEOUT, XrdClientSockConnectParms::TcpHost, and XrdClientSockConnectParms::TcpWindowSize.
XrdClientSock::~XrdClientSock | ( | ) | [virtual] |
virtual int XrdClientSock::SaveSocket | ( | ) | [inline, protected, virtual] |
Definition at line 55 of file XrdClientSock.hh.
References fConnected, fRDInterrupt, fSocket, and fWRInterrupt.
Referenced by XrdClientPhyConnection::SaveSocket().
void XrdClientSock::SetInterrupt | ( | int | which = 0 |
) | [inline, protected] |
Definition at line 58 of file XrdClientSock.hh.
References fRDInterrupt, and fWRInterrupt.
Referenced by XrdClientPhyConnection::SetInterrupt().
int XrdClientSock::TryConnect_low | ( | bool | isUnix = 0 , |
|
int | altport = 0 , |
|||
int | windowsz = 0 | |||
) | [protected] |
Definition at line 357 of file XrdClientSock.cc.
References XrdOucString::c_str(), EnvGetLong, EnvGetString, Error, fConnected, fHost, XrdClientUrlInfo::File, XrdClientUrlInfo::Host, XrdClientUrlInfo::HostAddr, if(), Info, XrdClientDebug::kHIDEBUG, XrdOucString::length(), NAME_CONNECTTIMEOUT, NAME_DFLTTCPWINDOWSIZE, NAME_SOCKS4HOST, NAME_SOCKS4PORT, XrdMonCtrCollector::port, XrdClientUrlInfo::Port, s, XrdClientSockConnectParms::TcpHost, and TRUE.
Referenced by XrdClientPSock::TryConnect(), TryConnect(), and XrdClientPSock::TryConnectParallelSock().
int XrdClientSock::SendRaw_sock | ( | const void * | buffer, | |
int | length, | |||
Sockdescr | sock | |||
) | [protected, virtual] |
Definition at line 209 of file XrdClientSock.cc.
References Error, pollfd::events, EWOULDBLOCK, fConnected, pollfd::fd, fHost, fRequestTimeout, fWRInterrupt, XrdClientUrlInfo::Host, n, poll(), POLLERR, POLLHUP, POLLNVAL, POLLOUT, XrdClientUrlInfo::Port, pollfd::revents, sleep, strerror(), XrdClientSockConnectParms::TcpHost, TXSOCK_ERR, TXSOCK_ERR_INTERRUPT, and TXSOCK_ERR_TIMEOUT.
Referenced by SendRaw().
Definition at line 71 of file XrdClientSock.hh.
Referenced by XrdClientPhyConnection::BanSockDescr().
virtual void XrdClientSock::UnBanSockDescr | ( | Sockdescr | ) | [inline, virtual] |
Definition at line 72 of file XrdClientSock.hh.
Referenced by XrdClientPhyConnection::UnBanSockDescr().
void XrdClientSock::ReinitFDTable | ( | ) | [inline] |
Definition at line 75 of file XrdClientSock.hh.
References fReinit_fd.
Referenced by XrdClientPhyConnection::ReinitFDTable().
int XrdClientSock::RecvRaw | ( | void * | buffer, | |
int | length, | |||
Sockid | substreamid = -1 , |
|||
Sockid * | usedsubstreamid = 0 | |||
) | [virtual] |
Definition at line 93 of file XrdClientSock.cc.
References DebugLevel, Error, pollfd::events, EWOULDBLOCK, FALSE, fConnected, pollfd::fd, fHost, fRDInterrupt, fRequestTimeout, fSocket, XrdClientUrlInfo::Host, Info, XrdClientDebug::kDUMPDEBUG, XrdClientDebug::kNODEBUG, n, poll(), POLLERR, POLLHUP, POLLIN, POLLNVAL, POLLPRI, XrdClientUrlInfo::Port, pollfd::revents, strerror(), XrdClientSockConnectParms::TcpHost, TXSOCK_ERR, TXSOCK_ERR_INTERRUPT, and TXSOCK_ERR_TIMEOUT.
Referenced by XrdClientPhyConnection::ReadRaw(), and Socks4Handshake().
int XrdClientSock::SendRaw | ( | const void * | buffer, | |
int | length, | |||
Sockid | substreamid = 0 | |||
) | [virtual] |
Definition at line 303 of file XrdClientSock.cc.
References fSocket, and SendRaw_sock().
Referenced by Socks4Handshake(), and XrdClientPhyConnection::WriteRaw().
void XrdClientSock::SetRequestTimeout | ( | int | timeout = -1 |
) |
Definition at line 66 of file XrdClientSock.cc.
References EnvGetLong, fRequestTimeout, and NAME_REQUESTTIMEOUT.
int XrdClientSock::Socks4Handshake | ( | Sockid | sockid | ) | [virtual] |
Definition at line 427 of file XrdClientSock.cc.
References a, b, buf, c, XrdOucString::c_str(), cuserid(), d, fHost, XrdClientUrlInfo::HostAddr, NULL, XrdMonCtrCollector::port, XrdClientUrlInfo::Port, pwd(), RecvRaw(), SendRaw(), strcpy(), and XrdClientSockConnectParms::TcpHost.
Referenced by TryConnect().
void XrdClientSock::TryConnect | ( | bool | isUnix = 0 |
) | [virtual] |
Definition at line 314 of file XrdClientSock.cc.
References Disconnect(), EnvGetString, fConnected, fSocket, Info, XrdClientDebug::kHIDEBUG, NAME_SOCKS4HOST, Socks4Handshake(), and TryConnect_low().
Referenced by XrdClientPhyConnection::Connect().
Definition at line 104 of file XrdClientSock.hh.
Referenced by XrdClientPhyConnection::TryConnectParallelStream().
Definition at line 109 of file XrdClientSock.hh.
Referenced by XrdClientPhyConnection::EstablishPendingParallelStream().
virtual int XrdClientSock::RemoveParallelSock | ( | Sockid | ) | [inline, virtual] |
Definition at line 111 of file XrdClientSock.hh.
Referenced by XrdClientPhyConnection::RemoveParallelStream().
virtual Sockid XrdClientSock::GetSockIdHint | ( | int | ) | [inline, virtual] |
Definition at line 114 of file XrdClientSock.hh.
Referenced by XrdClientPhyConnection::GetSockIdHint().
void XrdClientSock::Disconnect | ( | ) | [virtual] |
Definition at line 75 of file XrdClientSock.cc.
References close, fConnected, and fSocket.
Referenced by XrdClientPhyConnection::Disconnect(), TryConnect(), and ~XrdClientSock().
bool XrdClientSock::IsConnected | ( | ) | [inline] |
Definition at line 118 of file XrdClientSock.hh.
References fConnected.
Referenced by XrdClientPhyConnection::Connect(), XrdClientPhyConnection::IsValid(), XrdClientPhyConnection::ReadRaw(), and XrdClientPhyConnection::WriteRaw().
virtual int XrdClientSock::GetSockIdCount | ( | ) | [inline, virtual] |
Definition at line 119 of file XrdClientSock.hh.
Referenced by XrdClientPhyConnection::GetSockIdCount().
virtual void XrdClientSock::PauseSelectOnSubstream | ( | Sockid | ) | [inline, virtual] |
Definition at line 120 of file XrdClientSock.hh.
Referenced by XrdClientPhyConnection::PauseSelectOnSubstream().
virtual void XrdClientSock::RestartSelectOnSubstream | ( | Sockid | ) | [inline, virtual] |
Definition at line 121 of file XrdClientSock.hh.
Referenced by XrdClientPhyConnection::RestartSelectOnSubstream().
friend class XrdClientPhyConnection [friend] |
Definition at line 35 of file XrdClientSock.hh.
int XrdClientSock::fSocket [private] |
Definition at line 39 of file XrdClientSock.hh.
Referenced by Disconnect(), XrdClientPhyConnection::GetSocket(), RecvRaw(), SaveSocket(), SendRaw(), TryConnect(), and XrdClientSock().
int XrdClientSock::fRequestTimeout [protected] |
Definition at line 44 of file XrdClientSock.hh.
Referenced by RecvRaw(), SendRaw_sock(), SetRequestTimeout(), and XrdClientSock().
XrdClientSockConnectParms XrdClientSock::fHost [protected] |
Definition at line 45 of file XrdClientSock.hh.
Referenced by RecvRaw(), SendRaw_sock(), Socks4Handshake(), TryConnect_low(), and XrdClientSock().
bool XrdClientSock::fConnected [protected] |
Definition at line 47 of file XrdClientSock.hh.
Referenced by XrdClientPSock::Disconnect(), Disconnect(), IsConnected(), RecvRaw(), SaveSocket(), XrdClientPSock::SaveSocket(), SendRaw_sock(), XrdClientPSock::TryConnect(), TryConnect(), TryConnect_low(), and XrdClientSock().
bool XrdClientSock::fRDInterrupt [protected] |
Definition at line 48 of file XrdClientSock.hh.
Referenced by RecvRaw(), SaveSocket(), XrdClientPSock::SaveSocket(), SetInterrupt(), and XrdClientSock().
bool XrdClientSock::fWRInterrupt [protected] |
Definition at line 49 of file XrdClientSock.hh.
Referenced by SaveSocket(), XrdClientPSock::SaveSocket(), SendRaw_sock(), SetInterrupt(), and XrdClientSock().
bool XrdClientSock::fReinit_fd [protected] |
Definition at line 53 of file XrdClientSock.hh.
Referenced by ReinitFDTable(), and XrdClientPSock::XrdClientPSock().