45 struct XrdClientSockConnectParms {
46 XrdClientUrlInfo TcpHost;
53 typedef int Sockdescr;
55 friend class XrdClientPhyConnection;
65 XrdClientSockConnectParms fHost;
75 virtual int SaveSocket() {
int fd = fSocket; fSocket = -1;
76 fConnected = 0; fRDInterrupt = 0; fWRInterrupt = 0;
return fd; }
78 void SetInterrupt(
int which = 0) {
if (which == 0 || which == 1) fRDInterrupt = 1;
79 if (which == 0 || which == 2) fWRInterrupt = 1; }
82 int TryConnect_low(
bool isUnix = 0,
int altport = 0,
int windowsz = 0);
85 virtual int SendRaw_sock(
const void* buffer,
int length, Sockdescr sock);
96 XrdClientSock(XrdClientUrlInfo host,
int windowsize = 0,
int fd = -1 );
97 virtual ~XrdClientSock();
99 virtual void BanSockDescr(Sockdescr, Sockid) {}
100 virtual void UnBanSockDescr(Sockdescr) { }
103 void ReinitFDTable() { fReinit_fd =
true; }
112 virtual int RecvRaw(
void* buffer,
int length, Sockid substreamid = -1,
113 Sockid *usedsubstreamid = 0);
117 virtual int SendRaw(
const void* buffer,
int length, Sockid substreamid = 0);
119 void SetRequestTimeout(
int timeout = -1);
124 virtual int Socks4Handshake(Sockid sockid);
126 virtual void TryConnect(
bool isUnix = 0);
132 virtual Sockdescr TryConnectParallelSock(
int ,
int , Sockid &) {
return -1; }
137 virtual int EstablishParallelSock(Sockid , Sockid ) {
return -1; }
139 virtual int RemoveParallelSock(Sockid ) {
return -1; };
142 virtual Sockid GetSockIdHint(
int ) {
return 0; }
144 virtual void Disconnect();
146 bool IsConnected() {
return fConnected;}
147 virtual int GetSockIdCount() {
return 1; }
148 virtual void PauseSelectOnSubstream(Sockid ) { }
149 virtual void RestartSelectOnSubstream(Sockid ) { }