Changeset 7743 for code/branches
- Timestamp:
- Dec 8, 2010, 5:13:03 PM (14 years ago)
- Location:
- code/branches/presentation/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentation/src/libraries/network/MasterServer.cc
r7739 r7743 220 220 } 221 221 222 /* tell people we're now initialized and blocking. */223 COUT(0) << "MasterServer initialized, waiting for connections.\n";224 222 225 /* endless loop until we quit */ 226 while( this->quit == false ) 227 { 228 /* create an iterator for the loop */ 229 while( enet_host_service( this->server, event, 1000 ) >= 0 ) 230 { /* check what type of event it is and react accordingly */ 231 switch (event->type) 232 { /* new connection */ 233 case ENET_EVENT_TYPE_CONNECT: 234 eventConnect( event ); break; 235 236 /* disconnect */ 237 case ENET_EVENT_TYPE_DISCONNECT: 238 eventDisconnect( event ); break; 239 240 /* incoming data */ 241 case ENET_EVENT_TYPE_RECEIVE: eventData( event ); break; 242 default: break; 243 } 244 } 223 /* create an iterator for the loop */ 224 enet_host_service( this->server, event, 100 ); 225 226 /* check what type of event it is and react accordingly */ 227 switch (event->type) 228 { /* new connection */ 229 case ENET_EVENT_TYPE_CONNECT: 230 eventConnect( event ); break; 231 232 /* disconnect */ 233 case ENET_EVENT_TYPE_DISCONNECT: 234 eventDisconnect( event ); break; 235 236 /* incoming data */ 237 case ENET_EVENT_TYPE_RECEIVE: eventData( event ); break; 238 default: break; 245 239 } 246 240 … … 283 277 //this->mainlist = new ServerList(); 284 278 this->peers = new PeerList(); 279 280 /* tell people we're now initialized */ 281 COUT(0) << "MasterServer initialized, waiting for connections.\n"; 285 282 } 286 283 -
code/branches/presentation/src/orxonox/Main.cc
r7739 r7743 77 77 " standalone,server,client" 78 78 " level" 79 " server,client "79 " server,client,masterserver" 80 80 " level" 81 81 ); -
code/branches/presentation/src/orxonox/gamestates/GSMasterServer.cc
r7739 r7743 63 63 64 64 void GSMasterServer::update(const Clock& time) 65 { /* nothing so far */ } 65 { 66 this->mserver->run(); 67 } 66 68 }
Note: See TracChangeset
for help on using the changeset viewer.