Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9471 in orxonox.OLD for branches/proxy/src


Ignore:
Timestamp:
Jul 25, 2006, 10:35:06 PM (18 years ago)
Author:
patrick
Message:

better now, a proxy server connected to the master server for the first time. now lets work on the hybrid mode

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

Legend:

Unmodified
Added
Removed
  • branches/proxy/src/lib/network/network_manager.cc

    r9470 r9471  
    133133  this->networkStream = new NetworkStream(NET_PROXY_SERVER_ACTIVE );
    134134  // first connect to the master server for synchronization
    135   this->networkStream->connectToMasterServer(NetworkSettings::getInstance()->getMasterAddr().ipString(), 9999);
     135  this->networkStream->connectToMasterServer(NetworkSettings::getInstance()->getMasterAddr().ipString(), 10000);
    136136  // start the handshake with the master server
    137137  this->networkStream->startHandshake(NET_ID_MASTER_SERVER);
  • branches/proxy/src/lib/network/network_stream.cc

    r9470 r9471  
    253253void NetworkStream::startHandshake(int userId)
    254254{
    255   Handshake* hs = new Handshake(NET_CLIENT/* this->pInfo->nodeType*/);
     255  Handshake* hs = new Handshake(this->pInfo->nodeType);
    256256  // fake the unique id
    257257  hs->setUniqueID( NET_UID_HANDSHAKE );
     
    399399      // this creates a new entry in the peers list
    400400      peers[userId].socket = tempNetworkSocket;
     401      peers[userId].nodeType = NET_CLIENT;
    401402      this->handleConnect(userId);
    402403
     
    430431      // this creates a new entry in the peers list
    431432      peers[userId].socket = tempNetworkSocket;
     433      peers[userId].nodeType = NET_PROXY_SERVER_ACTIVE;
    432434      this->handleConnect(userId);
    433435
     
    492494
    493495    // the connecting node of course is a client
    494   peers[userId].nodeType = NET_CLIENT;
    495496  peers[userId].ip = peers[userId].socket->getRemoteAddress();
    496497}
     
    555556          {
    556557            // make sure this is a client
    557             if( this->pInfo->isClient() || SharedNetworkData::getInstance()->isProxyServerActive())
     558            if(  SharedNetworkData::getInstance()->isClient() || SharedNetworkData::getInstance()->isProxyServerActive())
    558559            {
    559560              SharedNetworkData::getInstance()->setHostID( it->second.handshake->getHostId() );
     
    592593            {
    593594
    594               if ( this->pInfo->isMasterServer() )
     595              if (  SharedNetworkData::getInstance()->isMasterServer() )
    595596              {
    596597                it->second.nodeType = it->second.handshake->getRemoteNodeType();
Note: See TracChangeset for help on using the changeset viewer.