Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9420 in orxonox.OLD for branches/proxy


Ignore:
Timestamp:
Jul 24, 2006, 1:42:23 PM (18 years ago)
Author:
patrick
Message:

reconnection setup switch

File:
1 edited

Legend:

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

    r9419 r9420  
    535535                this->handleReconnect( it->second.userId);
    536536
    537               PRINTF(0)("redirection: %i\n\n\n", it->second.handshake->redirect());
    538 
    539537              // create the new network game manager and init it
    540538              this->networkGameManager = NetworkGameManager::getInstance();
     
    606604void NetworkStream::handleReconnect(int userId)
    607605{
     606
     607  PeerInfo* pInfo = &this->peers[userId];
     608
    608609  PRINTF(0)("===============================================\n");
    609610  PRINTF(0)("Client is redirected to the other proxy servers\n");
     611  PRINTF(0)("  connecting to: %s\n", pInfo->handshake->getProxy1Address().ipString().c_str());
    610612  PRINTF(0)("===============================================\n");
    611 
    612   return;
    613 
    614   PeerInfo* pInfo = &this->peers[userId];
    615613
    616614  // reject the server
     
    620618  pInfo->lastAckedState = 0;
    621619  pInfo->lastRecvedState = 0;
     620
     621  // temp save the ip address here
     622  IP proxyIP = pInfo->handshake->getProxy1Address();
     623
    622624  // not sure if this works as expected
    623625  if( pInfo->handshake)
     
    625627
    626628  // disconnect from the current server and reconnect to proxy server
    627   pInfo->socket->reconnectToServer( pInfo->handshake->getProxy1Address().ipString(), pInfo->handshake->getProxy1Address().port());
     629  pInfo->socket->reconnectToServer( proxyIP.ipString(), proxyIP.port());
    628630
    629631  // and restart the handshake
Note: See TracChangeset for help on using the changeset viewer.