Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7872 in orxonox.OLD for branches/network/src/subprojects


Ignore:
Timestamp:
May 26, 2006, 2:08:51 PM (19 years ago)
Author:
rennerc
Message:

removing zerobytes should work now

Location:
branches/network/src/subprojects/network
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/network/src/subprojects/network/network_unit_test.cc

    r7860 r7872  
    277277  {
    278278    MessageManager::getInstance()->sendMessage( TESTMESSAGEID, (byte*)"server to client", 18, RT_ALL, 0, MP_HIGHBANDWIDTH );
    279     netMan->synchronize( 1000 );
    280     SDL_Delay(1000);
     279    netMan->synchronize( 100 );
     280    SDL_Delay(100);
    281281    ss->debug();
    282282  }
     
    312312//  ss->setSynchronized( true );
    313313//  netMan->connectSynchronizeable( *ss );
     314 
     315  NetworkLog::getInstance()->listen( 7777 );
    314316
    315317  SimpleSync * ss = NULL;
     
    320322  for(;;)
    321323  {
    322     netMan->synchronize( 1000 );
     324    netMan->synchronize( 100 );
    323325    MessageManager::getInstance()->sendMessage( TESTMESSAGEID, (byte*)"client to server", 18, RT_ALL, 0, MP_HIGHBANDWIDTH );
    324326    ss = dynamic_cast<SimpleSync*>(ClassList::getObject( "Server", CL_SIMPLE_SYNC ) );
    325     SDL_Delay(1000);
     327    SDL_Delay(100);
    326328    if (ss)
    327329      ss->debug();
  • branches/network/src/subprojects/network/simple_sync.cc

    r7631 r7872  
    4040  in = 0;
    4141  out = 1;
     42  syncStr = "hallo test test";
    4243  id = this->registerVarId( new SynchronizeableInt( &in, &out, "var", PERMISSION_ALL ) );
     44  registerVar( new SynchronizeableString( &syncStr, &syncStr, "syncStr" ) );
    4345}
    4446
     
    5456{
    5557  printf("IN: %d OUT: %d\n", in, out);
     58  printf("str: %s\n", syncStr.c_str());
    5659}
    5760
     
    6265  in = 0;
    6366  out = 1;
     67  syncStr = "hallo test test";
    6468  id = this->registerVarId( new SynchronizeableInt( &in, &out, "var", PERMISSION_ALL ) );
     69  registerVar( new SynchronizeableString( &syncStr, &syncStr, "syncStr" ) );
    6570}
    6671
    6772
    6873
     74
  • branches/network/src/subprojects/network/simple_sync.h

    r7631 r7872  
    2323    int in;
    2424    int out;
     25    std::string syncStr;
    2526    int id;
    2627  };
Note: See TracChangeset for help on using the changeset viewer.