Changeset 186 for osgVisual/trunk/src/cluster
- Timestamp:
- Jan 8, 2011, 8:13:43 PM (14 years ago)
- Location:
- osgVisual/trunk/src/cluster
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
osgVisual/trunk/src/cluster/dataIO_clusterDummy.cpp
r183 r186 32 32 { 33 33 sendContainer = sendContainer_; 34 OSG_NOTIFY( osg::ALWAYS ) << "clusterDummy init() ;" << std::endl;34 OSG_NOTIFY( osg::ALWAYS ) << "clusterDummy init()" << std::endl; 35 35 return true; 36 36 } … … 38 38 bool dataIO_clusterDummy::processXMLConfiguration(xmlNode* clusterConfig_) 39 39 { 40 OSG_NOTIFY( osg::ALWAYS ) << "clusterDummy processXMLConfiguration() ;" << std::endl;40 OSG_NOTIFY( osg::ALWAYS ) << "clusterDummy processXMLConfiguration()" << std::endl; 41 41 return true; 42 42 } -
osgVisual/trunk/src/cluster/dataIO_clusterENet.cpp
r185 r186 109 109 bool dataIO_clusterENet::processXMLConfiguration(xmlNode* clusterConfig_) 110 110 { 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 111 // Extract cluster role 112 xmlAttr *attr = clusterConfig_->properties; 113 while ( attr ) 114 { 115 std::string attr_name=reinterpret_cast<const char*>(attr->name); 116 std::string attr_value=reinterpret_cast<const char*>(attr->children->content); 117 if( attr_name == "implementation" ) 118 { 119 if(attr_value != "enet") 120 { 121 OSG_NOTIFY( osg::ALWAYS ) << "WARNING: Cluster configuration does not match the currently used 'enet' implementation, falling back to clusterDummy" << std::endl; 122 return false; 123 } 124 } 125 if( attr_name == "hardsync" ) 126 { 127 if(attr_value == "yes") 128 hardSync = true; 129 else 130 hardSync = false; 131 } 132 if( attr_name == "master_ip" ) 133 { 134 serverToConnect = attr_value; 135 } 136 if( attr_name == "port" ) 137 { 138 std::istringstream i(attr_value); 139 if (!(i >> port)) 140 { 141 OSG_NOTIFY( osg::ALWAYS ) << "WARNING: Cluster configuration : Invalid port number '" << attr_value << "', falling back to clusterDummy" << std::endl; 142 return false; 143 } 144 } 145 if( attr_name == "use_zlib_compressor" ) 146 { 147 if(attr_value == "yes") 148 compressionEnabled = true; 149 else 150 compressionEnabled = false; 151 } 152 attr = attr->next; 153 } // WHILE attrib END 154 154 155 155 return true;
Note: See TracChangeset
for help on using the changeset viewer.