Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9340 in orxonox.OLD for branches


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

network stream handshake init remastering and safer proxysettings init

Location:
branches/proxy/src/lib/network
Files:
3 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)
  • branches/proxy/src/lib/network/proxy/proxy_settings.cc

    r9308 r9340  
    3434  /* set the class id for the base object */
    3535  this->setClassID(CL_PROXY_SETTINGS, "ProxySettings");
     36  // suggest a good standard max players value
     37  this->maxPlayer = 10;
    3638}
    3739
  • branches/proxy/src/lib/network/proxy/proxy_settings.h

    r9326 r9340  
    4444
    4545  private:
    46 
    47     static ProxySettings*       singletonRef;            //!< Pointer to the only instance of this Class
    48 
    49     int                         maxPlayer;               //!< maximal number of players
    50 
     46    static ProxySettings*        singletonRef;            //!< Pointer to the only instance of this Class
     47    int                          maxPlayer;               //!< maximal number of players
    5148    std::vector<IPaddress*>      proxies;                 //!< all registered proxies
    5249
Note: See TracChangeset for help on using the changeset viewer.