00001 #ifndef XRD_CLOGCONNECTION_H 00002 #define XRD_CLOGCONNECTION_H 00003 /******************************************************************************/ 00004 /* */ 00005 /* X r d C l i e n t L o g C o n n e c t i o n . h h */ 00006 /* */ 00007 /* Author: Fabrizio Furano (INFN Padova, 2004) */ 00008 /* Adapted from TXNetFile (root.cern.ch) originally done by */ 00009 /* Alvise Dorigo, Fabrizio Furano */ 00010 /* INFN Padova, 2003 */ 00011 /* */ 00012 /* This file is part of the XRootD software suite. */ 00013 /* */ 00014 /* XRootD is free software: you can redistribute it and/or modify it under */ 00015 /* the terms of the GNU Lesser General Public License as published by the */ 00016 /* Free Software Foundation, either version 3 of the License, or (at your */ 00017 /* option) any later version. */ 00018 /* */ 00019 /* XRootD is distributed in the hope that it will be useful, but WITHOUT */ 00020 /* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or */ 00021 /* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public */ 00022 /* License for more details. */ 00023 /* */ 00024 /* You should have received a copy of the GNU Lesser General Public License */ 00025 /* along with XRootD in a file called COPYING.LESSER (LGPL license) and file */ 00026 /* COPYING (GPL license). If not, see <http://www.gnu.org/licenses/>. */ 00027 /* */ 00028 /* The copyright holder's institutional names and contributor's names may not */ 00029 /* be used to endorse or promote products derived from this software without */ 00030 /* specific prior written permission of the institution or contributor. */ 00031 /******************************************************************************/ 00032 00034 // // 00035 // Class implementing logical connections // 00036 // // 00038 00039 #include "XProtocol/XPtypes.hh" 00040 #include "XrdClient/XrdClientUnsolMsg.hh" 00041 00042 class XrdClientSid; 00043 class XrdClientPhyConnection; 00044 00045 class XrdClientLogConnection: public XrdClientAbsUnsolMsgHandler, 00046 public XrdClientUnsolMsgSender { 00047 private: 00048 XrdClientPhyConnection *fPhyConnection; 00049 00050 // A logical connection has a private streamid 00051 kXR_unt16 fStreamid; 00052 00053 XrdClientSid *fSidManager; 00054 00055 public: 00056 XrdClientLogConnection(XrdClientSid *sidmgr); 00057 virtual ~XrdClientLogConnection(); 00058 00059 inline XrdClientPhyConnection *GetPhyConnection() { 00060 return fPhyConnection; 00061 } 00062 00063 UnsolRespProcResult ProcessUnsolicitedMsg(XrdClientUnsolMsgSender *sender, 00064 XrdClientMessage *unsolmsg); 00065 00066 int ReadRaw(void *buffer, int BufferLength); 00067 00068 inline void SetPhyConnection(XrdClientPhyConnection *PhyConn) { 00069 fPhyConnection = PhyConn; 00070 } 00071 00072 int WriteRaw(const void *buffer, int BufferLength, int substreamid); 00073 00074 inline kXR_unt16 Streamid() { 00075 return fStreamid; 00076 }; 00077 }; 00078 #endif