00001 /*---------------------------------------------------------------------------*\ 00002 * OpenSG * 00003 * * 00004 * * 00005 * Copyright (C) 2000-2002 by the OpenSG Forum * 00006 * * 00007 * www.opensg.org * 00008 * * 00009 * contact: dirk@opensg.org, gerrit.voss@vossg.org, jbehr@zgdv.de * 00010 * * 00011 \*---------------------------------------------------------------------------*/ 00012 /*---------------------------------------------------------------------------*\ 00013 * License * 00014 * * 00015 * This library is free software; you can redistribute it and/or modify it * 00016 * under the terms of the GNU Library General Public License as published * 00017 * by the Free Software Foundation, version 2. * 00018 * * 00019 * This library is distributed in the hope that it will be useful, but * 00020 * WITHOUT ANY WARRANTY; without even the implied warranty of * 00021 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * 00022 * Library General Public License for more details. * 00023 * * 00024 * You should have received a copy of the GNU Library General Public * 00025 * License along with this library; if not, write to the Free Software * 00026 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * 00027 * * 00028 \*---------------------------------------------------------------------------*/ 00029 /*---------------------------------------------------------------------------*\ 00030 * Changes * 00031 * * 00032 * * 00033 * * 00034 * * 00035 * * 00036 * * 00037 \*---------------------------------------------------------------------------*/ 00038 00039 00040 #ifndef _POINTSOCKPIPELINE_H_ 00041 #define _POINTSOCKPIPELINE_H_ 00042 #ifdef __sgi 00043 #pragma once 00044 #endif 00045 00046 //--------------------------------------------------------------------------- 00047 // Includes 00048 //--------------------------------------------------------------------------- 00049 00050 #include <string> 00051 #include <map> 00052 #include <OSGBase.h> 00053 #include <OSGBaseTypes.h> 00054 #include <OSGPointSockConnection.h> 00055 #include <OSGTime.h> 00056 #include <OSGDgramSocket.h> 00057 #include <OSGDgram.h> 00058 #include <OSGDgramQueue.h> 00059 00060 OSG_BEGIN_NAMESPACE 00061 00062 class OSG_BASE_DLLMAPPING PointSockPipeline : public PointSockConnection 00063 { 00064 /*========================== PUBLIC =================================*/ 00065 public: 00066 00067 /*---------------------------------------------------------------------*/ 00071 PointSockPipeline ( void ); 00072 virtual ~PointSockPipeline ( void ); 00073 00075 /*---------------------------------------------------------------------*/ 00079 virtual const ConnectionType *getType (void); 00080 00082 /*---------------------------------------------------------------------*/ 00086 virtual Channel connectGroup(const std::string &address, 00087 Time timeout=-1 ); 00088 virtual void disconnect ( void ); 00089 virtual Channel acceptGroup ( Time timeout=-1 ); 00090 00092 /*---------------------------------------------------------------------*/ 00096 virtual Channel selectChannel (Time timeout=-1) throw (ReadError); 00097 00099 /*---------------------------------------------------------------------*/ 00103 static PointConnection *create(void); 00104 00107 /*========================= PROTECTED ===============================*/ 00108 protected: 00109 00110 /*---------------------------------------------------------------------*/ 00114 virtual void read (MemoryHandle mem, UInt32 size); 00115 virtual void readBuffer (void); 00116 00118 /*---------------------------------------------------------------------*/ 00122 StreamSocket _next; 00123 StreamSocket _prev; 00124 bool _last; 00125 bool _initialized; 00126 00129 /*========================== PRIVATE ================================*/ 00130 private: 00131 00132 /*---------------------------------------------------------------------*/ 00136 void initialize(void); 00137 00139 /*---------------------------------------------------------------------*/ 00143 static ConnectionType _type; 00144 00147 typedef PointSockConnection Inherited; 00148 00149 // prohibit default functions (move to 'public' if you need one) 00150 PointSockPipeline(const PointSockPipeline &source); 00151 PointSockPipeline& operator =(const PointSockPipeline &source); 00152 }; 00153 00154 //--------------------------------------------------------------------------- 00155 // Exported Types 00156 //--------------------------------------------------------------------------- 00157 00158 // class pointer 00159 00160 typedef PointSockPipeline *PointSockPipelineP; 00161 00162 OSG_END_NAMESPACE 00163 00164 #define OSG_GROUPSOCKPIPELINE_HEADER_CVSID "@(#)$Id: $" 00165 00166 #endif /* _GROUPSOCKPIPELINE_H_ */
1.4.3