Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6660 in orxonox.OLD for branches/network/src/lib


Ignore:
Timestamp:
Jan 23, 2006, 3:38:45 PM (19 years ago)
Author:
patrick
Message:

network: some more nodes connected to the NetworkStream no sync yet

Location:
branches/network/src/lib
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/network/src/lib/coord/p_node.cc

    r6659 r6660  
    697697    PNode::nullParent = new PNode(NULL, PNODE_PARENT_MODE_DEFAULT | PNODE_REPARENT_TO_NULL);
    698698    PNode::nullParent->setName("NullParent");
     699    PNode::nullParent->setSynchronized(true);
    699700  }
    700701  return PNode::nullParent;
  • branches/network/src/lib/network/network_game_manager.cc

    r6634 r6660  
    247247      s->setUniqueID( newUniqueID++ );
    248248      s->setOwner( 0 );
    249       this->networkStream->connectSynchronizeable( *s );
    250249      return b;
    251250    }
  • branches/network/src/lib/network/network_manager.cc

    r6659 r6660  
    183183 void NetworkManager::debug()
    184184{
     185  PRINT(0)("=================Network::debug()=========\n");
    185186  this->defaultSyncStream->debug();
     187  PRINT(0)("===========================================\n");
    186188}
  • branches/network/src/lib/network/network_stream.cc

    r6659 r6660  
    5353}
    5454
     55
    5556NetworkStream::NetworkStream(IPaddress& address)
    5657{
     
    6061  this->networkProtocol = new NetworkProtocol();
    6162  this->connectionMonitor = new ConnectionMonitor();
    62 
    63   Handshake* hs = new Handshake(false);
    64   hs->setUniqueID( 0 );
    65   this->handshakes.push_back(hs);
    66   this->connectSynchronizeable(*hs);
    67   PRINTF(0)("NetworkStream: %s\n", hs->getName());
    6863  this->maxConnections = 1;
    6964}
     
    136131
    137132
     133void NetworkStream::startHandshake()
     134{
     135  Handshake* hs = new Handshake(false);
     136  hs->setUniqueID( 0 );
     137  this->handshakes.push_back(hs);
     138  //this->connectSynchronizeable(*hs);
     139  PRINTF(0)("NetworkStream: %s\n", hs->getName());
     140}
     141
     142
    138143void NetworkStream::connectSynchronizeable(Synchronizeable& sync)
    139144{
     
    426431void NetworkStream::debug()
    427432{
    428   PRINT(0)("=================NetworkStream::debug()====\n");
    429   PRINT(0)(" Host ID: %i\n", this->myHostId);
    430 
    431   PRINT(0)(" Got %i connected Synchronizeables:\n", this->synchronizeables.size());
     433  if( this->isServer())
     434    PRINT(0)(" Host ist Server with ID: %i\n", this->myHostId);
     435  else
     436    PRINT(0)(" Host ist Client with ID: %i\n", this->myHostId);
     437
     438  PRINT(0)(" Got %i connected Synchronizeables, showing active Syncs:\n", this->synchronizeables.size());
    432439  for (SynchronizeableList::iterator it = synchronizeables.begin(); it!=synchronizeables.end(); it++)
    433440  {
    434     PRINT(0)("  Synchronizeable of class: %s::%s, with unique ID: %i, Synchronize: %i\n", (*it)->getClassName(), (*it)->getName(), (*it)->getUniqueID(), (*it)->beSynchronized());
    435   }
    436 
     441    if( (*it)->beSynchronized() == true)
     442      PRINT(0)("  Synchronizeable of class: %s::%s, with unique ID: %i, Synchronize: %i\n", (*it)->getClassName(), (*it)->getName(),
     443               (*it)->getUniqueID(), (*it)->beSynchronized());
     444  }
    437445  PRINT(0)(" Maximal Connections: %i\n", this->maxConnections);
    438   PRINT(0)("===========================================\n");
    439 
    440 }
    441 
    442 
    443 
    444 
    445 
    446 
    447 
    448 
    449 
    450 
    451 
    452 
    453 
    454 
     446
     447}
     448
     449
     450
     451
     452
     453
     454
     455
     456
     457
     458
     459
     460
     461
  • branches/network/src/lib/network/network_stream.h

    r6659 r6660  
    4141
    4242    void createNetworkGameManager();
     43    void startHandshake();
    4344
    4445    void connectSynchronizeable(Synchronizeable& sync);
Note: See TracChangeset for help on using the changeset viewer.