Changeset 8832 for code/branches/output/src/libraries/network/Server.cc
- Timestamp:
- Aug 9, 2011, 12:37:21 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/output/src/libraries/network/Server.cc
r8829 r8832 59 59 #include "FunctionCallManager.h" 60 60 #include "GamestateManager.h" 61 #include "WANDiscovery.h"62 61 63 62 namespace orxonox … … 99 98 } 100 99 101 102 /** helper that connects to the master server */103 void Server::helper_ConnectToMasterserver()104 {105 // WANDiscovery::getInstance().msc.sendRequest( MSPROTO_GAME_SERVER " "106 // MSPROTO_REGISTER_SERVER );107 }108 109 100 /** 110 101 * This function opens the server by creating the listener thread … … 121 112 /* make discoverable on WAN */ 122 113 WANDiscoverable::setActivity(true); 123 /* TODO this needs to be optional, we need a switch from the UI to124 * enable/disable this125 */126 // helper_ConnectToMasterserver();127 114 128 115 /* done */ … … 149 136 } 150 137 151 /* handle incoming data */152 int rephandler( char *addr, ENetEvent *ev )153 {154 /* reply to pings */155 if( !strncmp( (char *)ev->packet->data, MSPROTO_PING_GAMESERVER,156 MSPROTO_PING_GAMESERVER_LEN ) )157 //this->msc.sendRequest( MSPROTO_ACK );158 /* NOTE implement this after pollForReply159 * reimplementation160 */161 return 0;162 163 /* done handling, return all ok code 0 */164 return 0;165 }166 167 void Server::helper_HandleMasterServerRequests()168 {169 /* poll the master server for replies and see whether something170 * has to be done or changed.171 */172 //WANDiscovery::getInstance().msc.pollForReply( rhandler, 10 );173 }174 175 138 /** 176 139 * Run this function once every tick … … 185 148 // receive and process incoming discovery packets 186 149 LANDiscoverable::update(); 187 188 // receive and process requests from master server189 /* todo */190 //helper_HandleMasterServerRequests();191 150 192 151 if ( GamestateManager::hasPeers() )
Note: See TracChangeset
for help on using the changeset viewer.