- Timestamp:
- Dec 8, 2010, 4:08:22 PM (14 years ago)
- Location:
- code/branches/masterserver/src/libraries/network
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/masterserver/src/libraries/network/WANDiscovery.cc
r7692 r7737 41 41 ManageScopedSingleton(WANDiscovery, ScopeID::Root, true); 42 42 43 void WANDiscovery::setConfigValues() 44 { 45 SetConfigValue(this->msaddr, "msaddr"); 46 } 47 43 48 WANDiscovery::WANDiscovery() 44 49 { 50 /* debugging output */ 45 51 COUT(4) << "Creating WANDiscovery.\n"; 52 53 /* register object with orxonox main class */ 54 RegisterObject(WANDiscovery); 55 56 /* set default string for this->msaddr */ 57 this->msaddr = "localhost"; 58 59 /* ... and register a config value function for it */ 60 this->setConfigValues(); 46 61 47 62 /* initialize it and see if it worked */ … … 50 65 51 66 /* connect and see if it worked */ 52 if( msc.connect( MS_ADDRESS, 1234 ) )67 if( msc.connect( this->msaddr.c_str(), 1234 ) ) 53 68 COUT(2) << "Error: could not connect to master server at " 54 << MS_ADDRESS<< std::endl;69 << this->msaddr << std::endl; 55 70 71 /* debugging output */ 56 72 COUT(4) << "Initialization of WANDiscovery complete.\n"; 57 73 } -
code/branches/masterserver/src/libraries/network/WANDiscovery.h
r7692 r7737 32 32 #include "NetworkPrereqs.h" 33 33 #include "packet/ServerInformation.h" 34 #include "core/ConfigFileManager.h" 34 35 #include "util/Singleton.h" 36 #include "core/OrxonoxClass.h" 37 #include "core/ConfigValueIncludes.h" 38 #include "core/CoreIncludes.h" 35 39 #include "MasterServerComm.h" 36 40 #include "MasterServerProtocol.h" … … 46 50 class _NetworkExport WANDiscovery 47 51 // tolua_end 48 : public Singleton<WANDiscovery> 52 : public Singleton<WANDiscovery>, public OrxonoxClass 49 53 { // tolua_export 50 54 friend class Singleton<WANDiscovery>; … … 84 88 /** game server list */ 85 89 std::vector<packet::ServerInformation> servers_; 90 91 /** Function used for the configuration file parameter update */ 92 void setConfigValues(); 86 93 87 94 private: … … 92 99 MasterServerComm msc; 93 100 101 /** master server address */ 102 std::string msaddr; 103 94 104 }; // tolua_export 95 105
Note: See TracChangeset
for help on using the changeset viewer.