Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9548 in orxonox.OLD for branches/proxy/src/lib


Ignore:
Timestamp:
Jul 28, 2006, 11:28:32 AM (18 years ago)
Author:
patrick
Message:

more docu and a much better debug interface

Location:
branches/proxy/src/lib/network
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/proxy/src/lib/network/README.NETWORK

    r9540 r9548  
    5252The ids are created by the master/proxy servers. Each server receives an address space of 1000 nodes where it is able to assign nodes to. This address space could be extended quite easely, since we got plenty of numbers in 4bytes (integer)
    5353
     54The handshake sync has always the uniqueId == userId. This is why there are some reserved uniqueIds
    5455
    5556
     
    5758=========
    5859uniqueId is an id (unique :D) for each synchronizeable to be identified in a network. the number space for uniqueIds goes from 0 to maxplayers - 1
     60
     61The handshake sync has always the uniqueId == userId. This is why there are some reserved uniqueIds
    5962
    6063
  • branches/proxy/src/lib/network/network_stream.cc

    r9545 r9548  
    118118
    119119  this->pInfo = new PeerInfo();
    120   this->pInfo->userId = 0;
     120  this->pInfo->userId = NET_UID_UNASSIGNED;
    121121  this->pInfo->lastAckedState = 0;
    122122  this->pInfo->lastRecvedState = 0;
     
    533533  }
    534534
     535  PRINTF(0)("Current number of connections is: %i\n", this->peers.size());
     536  for ( PeerList::iterator it = peers.begin(); it != peers.end(); it++ )
     537  {
     538    PRINTF(0)("peers[%i] with uniqueId %i and address: %s\n", it->first, it->second.userId, it->second.ip.ipString().c_str());
     539  }
     540
     541
    535542  PRINT(0)(" Got %i connected Synchronizeables, showing active Syncs:\n", this->synchronizeables.size());
    536543  for (SynchronizeableList::iterator it = synchronizeables.begin(); it!=synchronizeables.end(); it++)
     
    643650              else if ( SharedNetworkData::getInstance()->isProxyServerActive() && it->second.isClient() )
    644651              {
    645                 PRINTF(0)("Handshake: i am in server role\n");
     652                PRINTF(0)("Handshake: Proxy in server role: connecting %i, key: %i\n", it->second.userId, it->first);
    646653
    647654                it->second.ip = it->second.socket->getRemoteAddress();
     
    685692{
    686693  this->bRedirect = false;
     694#warning this peer will be created if it does not yet exist: dangerous
    687695  PeerInfo* pInfo = &this->peers[userId];
    688696
Note: See TracChangeset for help on using the changeset viewer.