Changeset 7872 in orxonox.OLD for branches/network/src/subprojects
- Timestamp:
- May 26, 2006, 2:08:51 PM (19 years ago)
- Location:
- branches/network/src/subprojects/network
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/network/src/subprojects/network/network_unit_test.cc
r7860 r7872 277 277 { 278 278 MessageManager::getInstance()->sendMessage( TESTMESSAGEID, (byte*)"server to client", 18, RT_ALL, 0, MP_HIGHBANDWIDTH ); 279 netMan->synchronize( 100 0);280 SDL_Delay(100 0);279 netMan->synchronize( 100 ); 280 SDL_Delay(100); 281 281 ss->debug(); 282 282 } … … 312 312 // ss->setSynchronized( true ); 313 313 // netMan->connectSynchronizeable( *ss ); 314 315 NetworkLog::getInstance()->listen( 7777 ); 314 316 315 317 SimpleSync * ss = NULL; … … 320 322 for(;;) 321 323 { 322 netMan->synchronize( 100 0);324 netMan->synchronize( 100 ); 323 325 MessageManager::getInstance()->sendMessage( TESTMESSAGEID, (byte*)"client to server", 18, RT_ALL, 0, MP_HIGHBANDWIDTH ); 324 326 ss = dynamic_cast<SimpleSync*>(ClassList::getObject( "Server", CL_SIMPLE_SYNC ) ); 325 SDL_Delay(100 0);327 SDL_Delay(100); 326 328 if (ss) 327 329 ss->debug(); -
branches/network/src/subprojects/network/simple_sync.cc
r7631 r7872 40 40 in = 0; 41 41 out = 1; 42 syncStr = "hallo test test"; 42 43 id = this->registerVarId( new SynchronizeableInt( &in, &out, "var", PERMISSION_ALL ) ); 44 registerVar( new SynchronizeableString( &syncStr, &syncStr, "syncStr" ) ); 43 45 } 44 46 … … 54 56 { 55 57 printf("IN: %d OUT: %d\n", in, out); 58 printf("str: %s\n", syncStr.c_str()); 56 59 } 57 60 … … 62 65 in = 0; 63 66 out = 1; 67 syncStr = "hallo test test"; 64 68 id = this->registerVarId( new SynchronizeableInt( &in, &out, "var", PERMISSION_ALL ) ); 69 registerVar( new SynchronizeableString( &syncStr, &syncStr, "syncStr" ) ); 65 70 } 66 71 67 72 68 73 74 -
branches/network/src/subprojects/network/simple_sync.h
r7631 r7872 23 23 int in; 24 24 int out; 25 std::string syncStr; 25 26 int id; 26 27 };
Note: See TracChangeset
for help on using the changeset viewer.