Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jul 25, 2006, 10:35:06 PM (19 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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.