Changeset 7750
- Timestamp:
- Dec 8, 2010, 7:33:11 PM (14 years ago)
- Location:
- code/branches/presentation/src/libraries/network
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentation/src/libraries/network/MasterServer.cc
r7743 r7750 61 61 != mainlist.serverlist.end(); ++i ) 62 62 { 63 /* WORK MARK */64 63 /* send this particular server */ 65 64 /* build reply string */ … … 88 87 } 89 88 90 /* sendend-of-list packet */89 /* create end-of-list packet */ 91 90 reply = enet_packet_create( MSPROTO_SERVERLIST_END, 92 91 MSPROTO_SERVERLIST_END_LEN + 1, 93 92 ENET_PACKET_FLAG_RELIABLE ); 94 93 94 /* send end-of-list packet */ 95 95 enet_peer_send( event->peer, 0, reply ); 96 96 … … 159 159 { /* validate packet */ 160 160 if( !event || !(event->packet) || !(event->peer) ) 161 //|| !(event->packet->data) || !strlen(event->packet->data) )162 161 { COUT(2) << "No complete event given.\n"; 163 162 return -1; … … 168 167 enet_address_get_host_ip( &(event->peer->address), addrconv, 49 ); 169 168 170 /* DEBUG */ 171 /* output debug info about the data that has come, to be removed */ 169 /* output debug info about the data that has come */ 172 170 helper_output_debug( event, addrconv ); 173 171 … … 275 273 276 274 /***** INITIALIZE GAME SERVER AND PEER LISTS *****/ 277 //this->mainlist = new ServerList();278 275 this->peers = new PeerList(); 279 276 … … 292 289 /* clear the list of connected game servers */ 293 290 /* clear the list of connected game clients */ 294 295 291 } 296 292 -
code/branches/presentation/src/libraries/network/MasterServerProtocol.h
r7739 r7750 33 33 #define MS_ADDRESS "129.132.3.8" 34 34 35 /* Client token (shows that the party sending data is a client */ 35 36 #define MSPROTO_CLIENT "CL" 36 37 #define MSPROTO_CLIENT_LEN 2 37 38 39 /* Request: Serverlist (requiest made from client to master server */ 38 40 #define MSPROTO_REQ_LIST "REQ:LIST" 39 41 #define MSPROTO_REQ_LIST_LEN 8 … … 42 44 43 45 46 /* Game server token (shows that the party sending data is a game server) */ 44 47 #define MSPROTO_GAME_SERVER "GS" 45 48 #define MSPROTO_GAME_SERVER_LEN 2 46 49 50 /* Register game server at the master server, meaning request to be taken into$ 51 * the master servers game server list. 52 */ 47 53 #define MSPROTO_REGISTER_SERVER "REG:SER" 48 54 #define MSPROTO_REGISTER_SERVER_LEN 7 49 55 56 /* Server list item token */ 50 57 #define MSPROTO_SERVERLIST_ITEM "SI" 51 58 #define MSPROTO_SERVERLIST_ITEM_LEN 2 59 60 /* server list end token */ 52 61 #define MSPROTO_SERVERLIST_END "SL_END" 53 62 #define MSPROTO_SERVERLIST_END_LEN 6 … … 55 64 56 65 57 58 59 66 /* default master server port */ 60 67 #define ORX_MSERVER_PORT 55566 61 68 62 69 70 /* some constants for the networking of the master server, not very important. 71 * play with those if things don't work out well.$ 72 */ 63 73 #define ORX_MSERVER_MAXCONNS 32 64 74 #define ORX_MSERVER_MAXCHANS 2 65 75 66 76 67 68 69 77 #endif /* MASTER_SERVER_PROTO */ -
code/branches/presentation/src/libraries/network/Server.cc
r7745 r7750 101 101 102 102 103 /* TODO*/103 /** helper that connects to the master server */ 104 104 void Server::helper_ConnectToMasterserver() 105 105 { … … 173 173 { 174 174 /* handle incoming data */ 175 /* TODO this is to be implemented. */ 175 176 176 177 /* done handling, return all ok code 0 */ … … 180 181 void Server::helper_HandleMasterServerRequests() 181 182 { 183 /* poll the master server for replies and see whether something 184 * has to be done or changed. 185 */ 182 186 this->msc.pollForReply( rephandler ); 183 187 } -
code/branches/presentation/src/libraries/network/WANDiscovery.cc
r7749 r7750 47 47 COUT(4) << "Creating WANDiscovery.\n"; 48 48 49 /* register object with orxonox main class*/49 /* register object in orxonox */ 50 50 RegisterObject(WANDiscovery); 51 51 52 /* ... and register a config value function for it*/52 /* check for the masterserver address option in orxonox.ini */ 53 53 this->setConfigValues(); 54 54 … … 68 68 void WANDiscovery::setConfigValues() 69 69 { 70 /* update msaddress string from orxonox.ini config file, if it 71 * has changed. 72 */ 70 73 SetConfigValue( msaddress, "localhost"); 71 74 } -
code/branches/presentation/src/libraries/network/WANDiscovery.h
r7745 r7750 57 57 ~WANDiscovery(); 58 58 59 /** get content of msaddress */ 59 /** \return Address of the master server 60 * 61 * Get the master server address 62 */ 60 63 std::string getMSAddress() 61 64 { return this->msaddress; }
Note: See TracChangeset
for help on using the changeset viewer.