Changeset 9297 in orxonox.OLD for branches/proxy/src
- Timestamp:
- Jul 14, 2006, 4:28:54 PM (19 years ago)
- Location:
- branches/proxy/src/lib/network/proxy
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/proxy/src/lib/network/proxy/proxy_settings.cc
r9296 r9297 18 18 #include "proxy_settings.h" 19 19 #include "netdefs.h" 20 21 #include "loading/load_param.h" 20 22 21 23 … … 51 53 void ProxySettings::loadProxySettings(const TiXmlElement* root) 52 54 { 55 56 LoadParam(root, "max-player", this, ProxySettings, setMaxPlayer); 57 58 LoadParam(root, "proxy-addr", this, ProxySettings, setProxyAddr); 53 59 } 60 61 62 /** 63 * sets the proxy address to 64 * @param proxyAddr: the proxy address 65 */ 66 void ProxySettings::setProxyAddr(const std::string& proxyAddr) 67 { 68 IPaddress *ip = new IPaddress; 69 70 SDLNet_ResolveHost( ip, proxyAddr.c_str(), 9999 ); 71 72 this->proxies.push_back(ip); 73 } 74 75 76 77 78 79 80 -
branches/proxy/src/lib/network/proxy/proxy_settings.h
r9296 r9297 9 9 #include "base_object.h" 10 10 #include "netdefs.h" 11 12 #include <vector> 11 13 12 14 … … 27 29 void loadProxySettings(const TiXmlElement* root); 28 30 31 inline void setMaxPlayer(int number) { this->maxPlayer = number; } 32 void setProxyAddr(const std::string& proxyAddr); 33 29 34 30 35 private: … … 36 41 static ProxySettings* singletonRef; //!< Pointer to the only instance of this Class 37 42 43 int maxPlayer; //!< maximal number of players 44 45 std::vector<IPaddress*> proxies; //!< all registered proxies 46 38 47 }; 39 48
Note: See TracChangeset
for help on using the changeset viewer.