Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jan 23, 2006, 2:43:50 PM (18 years ago)
Author:
patrick
Message:

network: debug function for NetworkStream and connection

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/network/src/lib/network/network_stream.cc

    r6634 r6658  
    8484  // setUniqueID( maxCon+2 ) because we need one id for every handshake
    8585  // and one for handshake to reject client maxCon+1
    86   this->networkGameManager->setUniqueID( this->maxConnections+2 );
     86  this->networkGameManager->setUniqueID( this->maxConnections + 2 );
    8787  this->connectSynchronizeable( *(this->networkGameManager) );
    8888
     
    141141}
    142142
     143
    143144void NetworkStream::disconnectSynchronizeable(Synchronizeable& sync)
    144145{
     
    216217  /* DOWNSTREAM */
    217218
     219
     220
    218221  int dataLength;
    219222  int reciever;
     
    221224  for (SynchronizeableList::iterator it = synchronizeables.begin(); it!=synchronizeables.end(); it++)
    222225  {
    223     if ( (*it)!=NULL /*&& (*it)->getOwner() == myHostId*/ )
     226    if ( (*it)!=NULL && (*it)->beSynchronized() /*&& (*it)->getOwner() == myHostId*/ )
    224227    {
    225228      do {
     
    416419
    417420
     421
     422void NetworkStream::debug()
     423{
     424  PRINT(0)("=================NetworkStream::debug()====\n");
     425  PRINT(0)(" Host ID: %i\n", this->myHostId);
     426
     427  PRINT(0)(" Connected Synchronizeables:\n");
     428  for (SynchronizeableList::iterator it = synchronizeables.begin(); it!=synchronizeables.end(); it++)
     429  {
     430    PRINT(0)("  Synchronizeable of class: %s::%s, with unique ID: %i\n", (*it)->getClassName(), (*it)->getName(), (*it)->getUniqueID());
     431  }
     432
     433  PRINT(0)(" Maximal Connections: %i\n", this->maxConnections);
     434  PRINT(0)("===========================================\n");
     435
     436}
     437
     438
     439
     440
     441
     442
     443
     444
     445
     446
     447
     448
     449
     450
Note: See TracChangeset for help on using the changeset viewer.