46 #include "XrdOuc/XrdOucHash.hh"
47 #include "XrdSys/XrdSysPthread.hh"
53 class XrdClientLogConnection;
54 class XrdClientMessage;
55 class XrdClientThread;
60 class XrdClientConnectionMgr:
public XrdClientAbsUnsolMsgHandler,
61 XrdClientUnsolMsgSender {
64 XrdClientSid *fSidManager;
66 XrdClientVector<XrdClientLogConnection*> fLogVec;
67 XrdOucHash<XrdClientPhyConnection> fPhyHash;
73 XrdClientVector<XrdClientPhyConnection *> fPhyTrash;
83 CndVarInfo(): cv(0), cnt(0) {};
86 XrdOucHash<CndVarInfo> fConnectingCondVars;
88 XrdSysRecMutex fMutex;
92 XrdClientThread *fGarbageColl;
94 friend void * GarbageCollectorThread(
void *, XrdClientThread *thr);
96 ProcessUnsolicitedMsg(XrdClientUnsolMsgSender *sender,
97 XrdClientMessage *unsolmsg);
99 XrdClientConnectionMgr();
101 virtual ~XrdClientConnectionMgr();
107 int Connect(XrdClientUrlInfo RemoteAddress);
108 void Disconnect(
int LogConnectionID,
bool ForcePhysicalDisc);
110 void GarbageCollect();
112 XrdClientLogConnection
113 *GetConnection(
int LogConnectionID);
114 XrdClientPhyConnection *GetPhyConnection(XrdClientUrlInfo server);
117 ReadMsg(
int LogConnectionID);
119 int ReadRaw(
int LogConnectionID,
void *buffer,
int BufferLength);
120 int WriteRaw(
int LogConnectionID,
const void *buffer,
121 int BufferLength,
int substreamid);
123 XrdClientSid *SidManager() {
return fSidManager; }
125 friend int DisconnectElapsedPhyConn(
const char *,
126 XrdClientPhyConnection *,
void *);
127 friend int DestroyPhyConn(
const char *,
128 XrdClientPhyConnection *,
void *);