Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9409 in orxonox.OLD for branches


Ignore:
Timestamp:
Jul 24, 2006, 11:18:32 AM (18 years ago)
Author:
patrick
Message:

saturation level for auto proxy server activation

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

Legend:

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

    r9406 r9409  
    104104
    105105  LoadParam(root, "max-player", this, NetworkSettings, setMaxPlayer);
     106  LoadParam(root, "max-player-saturation", this, NetworkSettings, setMaxPlayerSaturations);
    106107
    107108
  • branches/proxy/src/lib/network/proxy/network_settings.h

    r9406 r9409  
    3636    /** @param number: sets the max number of players */
    3737    inline void setMaxPlayer(int number) { this->maxPlayer = number; }
     38    /** sets the @param saturation: a threshold in percente when the proxy servers should be activated to be able to redirect the clients */
     39    inline void setMaxPlayerSaturation(float saturation) { this->maxPlayerSaturation = saturation; }
    3840    /** @returns teh max number of players */
    3941    int getMaxPlayer() { return this->maxPlayer; }
     
    5355
    5456  private:
    55     static NetworkSettings*        singletonRef;            //!< Pointer to the only instance of this Class
     57    static NetworkSettings*      singletonRef;            //!< Pointer to the only instance of this Class
     58
    5659    int                          maxPlayer;               //!< maximal number of players
     60    float                        maxPlayerSaturation;     //!< the saturation level from where on the proxy server should be activated
     61
    5762    std::vector<IPaddress*>      proxies;                 //!< all registered proxies
    5863    IP                           masterServer;            //!< master server ip address
  • branches/proxy/src/lib/network/shared_network_data.cc

    r9406 r9409  
    3434  this->setClassID(CL_SHARED_NETWORK_DATA, "SharedNetworkData");
    3535
    36   this->nodeType = NET_CLIENT;
     36  this->nodeType = NET_MASTER_SERVER;
    3737  this->hostID = -1;
    3838  this->defaultSyncStream = NULL;
Note: See TracChangeset for help on using the changeset viewer.