Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jul 20, 2006, 10:09:43 AM (18 years ago)
Author:
patrick
Message:

network stream handshake init remastering and safer proxysettings init

File:
1 edited

Legend:

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

    r9339 r9340  
    324324      clientId = freeSocketSlots.back();
    325325      freeSocketSlots.pop_back();
    326       peers[clientId].socket = tempNetworkSocket;
    327       peers[clientId].handshake = new Handshake(this->pInfo->nodeType, clientId, this->networkGameManager->getUniqueID(), MessageManager::getInstance()->getUniqueID() );
    328       peers[clientId].handshake->setUniqueID(clientId);
    329 
    330       peers[clientId].connectionMonitor = new ConnectionMonitor( clientId );
    331       peers[clientId].userId = clientId;
    332326    }
    333327    else
     
    338332        if ( it->first >= clientId )
    339333          clientId = it->first + 1;
    340 
    341       peers[clientId].socket = tempNetworkSocket;
    342       // handshake handling
    343       peers[clientId].handshake = new Handshake(this->pInfo->nodeType, clientId, this->networkGameManager->getUniqueID(), MessageManager::getInstance()->getUniqueID());
    344       peers[clientId].handshake->setUniqueID(clientId);
    345 
    346       peers[clientId].connectionMonitor = new ConnectionMonitor( clientId );
    347       peers[clientId].userId = clientId;
    348 
    349       PRINTF(0)("num sync: %d\n", synchronizeables.size());
    350     }
    351 
     334    }
     335
     336    peers[clientId].socket = tempNetworkSocket;
     337      // create new handshake and init its variables
     338    peers[clientId].handshake = new Handshake(this->pInfo->nodeType, clientId, this->networkGameManager->getUniqueID(), MessageManager::getInstance()->getUniqueID() );
     339    peers[clientId].handshake->setUniqueID(clientId);
     340
     341    peers[clientId].connectionMonitor = new ConnectionMonitor( clientId );
     342    peers[clientId].userId = clientId;
     343
     344    PRINTF(0)("num sync: %d\n", synchronizeables.size());
    352345
    353346    // get the proxy server informations and write them to the handshake, if any (proxy)
Note: See TracChangeset for help on using the changeset viewer.