Changeset 7207 for code/branches/consolecommands3/src/libraries/network
- Timestamp:
- Aug 23, 2010, 6:50:22 PM (14 years ago)
- Location:
- code/branches/consolecommands3/src/libraries/network
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/consolecommands3/src/libraries/network/Client.cc
r7163 r7207 45 45 #include "util/Clock.h" 46 46 #include "util/Debug.h" 47 #include "util/ScopedSingletonManager.h" 47 48 #include "synchronisable/Synchronisable.h" 48 49 #include "packet/Chat.h" … … 52 53 #include "core/CommandLineParser.h" 53 54 #include "core/Game.h" 54 #include "core/ScopedSingletonManager.h"55 55 56 56 namespace orxonox … … 107 107 return ClientConnection::closeConnection(); 108 108 } 109 109 110 110 void Client::setDestination(const std::string& serverAddress, unsigned int port) 111 111 { -
code/branches/consolecommands3/src/libraries/network/LANDiscovery.cc
r7163 r7207 32 32 #include <cstring> 33 33 34 #include "util/ScopedSingletonManager.h" 34 35 #include "core/CoreIncludes.h" 35 #include "core/ScopedSingletonManager.h"36 36 37 37 38 38 namespace orxonox 39 { 39 { 40 40 ManageScopedSingleton(LANDiscovery, ScopeID::Root, true); 41 41 42 42 LANDiscovery::LANDiscovery() 43 43 { … … 49 49 enet_host_destroy(this->host_); 50 50 } 51 51 52 52 void LANDiscovery::discover() 53 53 { … … 56 56 enet_address_set_host(&address, "255.255.255.255"); 57 57 address.port = LAN_DISCOVERY_PORT; 58 58 59 59 ENetPeer* peer; 60 60 peer = enet_host_connect(this->host_, &address, 0); 61 61 62 62 ENetEvent event; 63 63 while( enet_host_service(this->host_, &event, 1000 ) ) … … 93 93 } 94 94 } 95 95 96 96 std::string LANDiscovery::getServerListItemName(unsigned int index) 97 97 { … … 101 101 return this->servers_[index].getServerName(); 102 102 } 103 103 104 104 std::string LANDiscovery::getServerListItemIP(unsigned int index) 105 105 { … … 109 109 return this->servers_[index].getServerIP(); 110 110 } 111 112 111 112 113 113 } // namespace orxonox
Note: See TracChangeset
for help on using the changeset viewer.