00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 const char *XrdClientLogConnectionCVSID = "$Id: XrdClientLogConnection.cc 30949 2009-11-02 16:37:58Z ganis $";
00017
00018 #include "XrdClient/XrdClientLogConnection.hh"
00019 #include "XrdClient/XrdClientPhyConnection.hh"
00020 #include "XrdClient/XrdClientDebug.hh"
00021 #include "XrdClient/XrdClientSid.hh"
00022
00023
00024
00025
00026 XrdClientLogConnection::XrdClientLogConnection(XrdClientSid *sidmgr):
00027 fSidManager(sidmgr) {
00028
00029
00030
00031 fPhyConnection = 0;
00032 fStreamid = fSidManager ? fSidManager->GetNewSid() : 0;
00033 }
00034
00035
00036 XrdClientLogConnection::~XrdClientLogConnection() {
00037
00038
00039
00040 if (fPhyConnection)
00041 fPhyConnection->CountLogConn(-1);
00042 if (fSidManager)
00043 fSidManager->ReleaseSidTree(fStreamid);
00044 }
00045
00046
00047 int XrdClientLogConnection::WriteRaw(const void *buffer, int bufferlength,
00048 int substreamid)
00049 {
00050
00051
00052
00053
00054 Info(XrdClientDebug::kDUMPDEBUG,
00055 "WriteRaw",
00056 "Writing " << bufferlength << " bytes to physical connection");
00057
00058 return fPhyConnection->WriteRaw(buffer, bufferlength, substreamid);
00059 }
00060
00061
00062 int XrdClientLogConnection::ReadRaw(void *buffer, int bufferlength)
00063 {
00064
00065
00066
00067
00068 Info(XrdClientDebug::kDUMPDEBUG,
00069 "ReadRaw",
00070 "Reading " << bufferlength << " bytes from physical connection");
00071
00072 return fPhyConnection->ReadRaw(buffer, bufferlength);
00073
00074
00075 }
00076
00077
00078 UnsolRespProcResult XrdClientLogConnection::ProcessUnsolicitedMsg(XrdClientUnsolMsgSender *sender,
00079 XrdClientMessage *unsolmsg)
00080 {
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093 return SendUnsolicitedMsg(sender, unsolmsg);
00094
00095 }