Changeset 66 for osgVisual/include/cluster
- Timestamp:
- Jul 11, 2010, 10:48:39 AM (14 years ago)
- Location:
- osgVisual/include/cluster
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
osgVisual/include/cluster/dataIO_clusterENet.h
r65 r66 20 20 21 21 #include <dataIO_cluster.h> 22 #include <dataIO_clusterENet_implementation.h> 22 23 23 24 namespace osgVisual … … 48 49 bool waitForAllReadyToSwap(); 49 50 bool sendSwapCommand(); 51 52 private: 53 osg::ref_ptr<osgVisual::dataIO_clusterENet_implementation> enet_impl; 50 54 }; 51 55 -
osgVisual/include/cluster/dataIO_clusterENet_implementation.h
r65 r66 4 4 #endif // _MSC_VER > 1000 5 5 6 #include <osg/referenced> 6 7 #include <enet/enet.h> 7 8 #include <iostream> … … 9 10 #include <vector> 10 11 12 namespace osgVisual 13 { 11 14 12 13 class ENet_implementation 15 class dataIO_clusterENet_implementation : public osg::Referenced 14 16 { 15 17 public: 16 ENet_implementation();17 ~ ENet_implementation();18 dataIO_clusterENet_implementation(); 19 ~dataIO_clusterENet_implementation(); 18 20 19 21 enum role {SERVER, CLIENT}; 20 22 21 bool init( ENet_implementation::role role_, unsigned short port_, int maxClients_=10, int maxChannels_=2, int maxInBandwidth_=0, int maxOutBandwidth_=0 ); // client & server // Done23 bool init( dataIO_clusterENet_implementation::role role_, unsigned short port_, int maxClients_=10, int maxChannels_=2, int maxInBandwidth_=0, int maxOutBandwidth_=0 ); // client & server // Done 22 24 bool connectTo( const char* remoteAddr_, int connectTimeout_ms_, int clientInfo_=0, int channelToAlloc_=2 ); // only as client // Done 23 25 void sendPacket( ENetPacket* packet_, enet_uint8 channelID_, unsigned int peerID_=0, bool autoFlush_=false ); // by PeerID // Done … … 32 34 protected: 33 35 unsigned short port; 34 ENet_implementation::role currentRole;36 dataIO_clusterENet_implementation::role currentRole; 35 37 static int activeENetInstances; 36 38 bool serverInitialized; // shows if the complete server is initialized. (After init()) … … 40 42 ENetEvent event; 41 43 }; 44 45 } // END NAMESPACE
Note: See TracChangeset
for help on using the changeset viewer.