Changeset 7681 in orxonox.OLD for branches/network/src/subprojects
- Timestamp:
- May 18, 2006, 2:32:47 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/network/src/subprojects/network/network_unit_test.cc
r7631 r7681 16 16 #include "state.h" 17 17 #include "shared_network_data.h" 18 #include "message_manager.h" 18 19 19 20 #include "simple_sync.h" … … 236 237 } 237 238 238 239 void testCB( MessageId messageId, byte * data, int dataLength, void * someData, int userId ) 240 { 241 printf("GOT MESSAGE: %s\n", data); 242 } 239 243 240 244 /** … … 261 265 ss->setSynchronized( true ); 262 266 267 //MessageManager::getInstance()->initUser( 1 ); 268 MessageManager::getInstance()->registerMessageHandler( TESTMESSAGEID, testCB, NULL ); 263 269 264 270 SDL_Delay(20); … … 266 272 for(;;) 267 273 { 274 MessageManager::getInstance()->sendMessage( TESTMESSAGEID, (byte*)"server to client", 18, RT_ALL, 0, MP_HIGHBANDWIDTH ); 268 275 netMan->synchronize(); 269 276 SDL_Delay(1000); … … 299 306 SimpleSync * ss = NULL; 300 307 308 //MessageManager::getInstance()->initUser( 0 ); 309 MessageManager::getInstance()->registerMessageHandler( TESTMESSAGEID, testCB, NULL ); 310 301 311 for(;;) 302 312 { 303 313 netMan->synchronize(); 314 MessageManager::getInstance()->sendMessage( TESTMESSAGEID, (byte*)"client to server", 18, RT_ALL, 0, MP_HIGHBANDWIDTH ); 304 315 ss = dynamic_cast<SimpleSync*>(ClassList::getObject( "Server", CL_SIMPLE_SYNC ) ); 305 316 SDL_Delay(1000);
Note: See TracChangeset
for help on using the changeset viewer.