Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9360 in orxonox.OLD for branches/proxy/src/lib/network/handshake.h


Ignore:
Timestamp:
Jul 20, 2006, 3:49:57 PM (18 years ago)
Author:
patrick
Message:

network ip synchronization work

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/proxy/src/lib/network/handshake.h

    r9350 r9360  
    1414#include "ip.h"
    1515#include "synchronizeable.h"
     16#include "shared_network_data.h"
    1617
    1718//!< a struct to save the handshakes to
     
    3536  //additional data
    3637  std::string   preferedNickName;              //!< prefered nick name
    37 
    38   int           redirectProxy;                 //!< true if the client should reconnect to a proxy server (either 1 or 2 )
    39   IP            proxy1;                        //!< ip address of the first proxy (0.0.0.0 of not available)
    40   IP            proxy2;                        //!< ip address of the second proxy (0.0.0.0 of not available)
    4138};
    4239
     
    8178
    8279    /** @returns if true the local client should reconnect to a proxy server from the proxy server list */
    83     inline bool redirect() { return this->remoteState.redirectProxy;}
     80    inline bool redirect() { return this->redirectProxy;}
    8481    /** @param flag: indicating if the client should be redirected */
    85     inline void setRedirect(bool flag) { this->localState.redirectProxy = flag; }
     82    inline void setRedirect(bool flag) { this->redirectProxy = flag; }
    8683
    8784    /** @param address: the address of the proxy server 1 if any */
    88     inline void setProxy1Address(IP address) { this->localState.proxy1 = address; }
     85    inline void setProxy1Address(IP address) { if( !SharedNetworkData::getInstance()->isMasterServer()) return; this->proxy1 = address; }
    8986    /** @returns the address of the proxy server 1 if any */
    90     inline IP getProxy1Address() { return this->remoteState.proxy1; }
     87    inline IP getProxy1Address() { return this->proxy1; }
    9188    /** @param address: the address of the proxy server 2 if any */
    92     inline void setProxy2Address(IP address) { this->localState.proxy2 = address; }
     89    inline void setProxy2Address(IP address) { this->proxy2 = address; }
    9390    /** @returns the address of the proxy server 2 if any */
    94     inline IP getProxy2Address() { return this->remoteState.proxy2; }
     91    inline IP getProxy2Address() { return this->proxy2; }
    9592
    9693
     
    119116
    120117    int                proxyAddressesSynched;                 //!< number of addresses synched
    121 
     118    int                redirectProxy;                         //!< true if the client should reconnect to a proxy server
     119    IP                 proxy1;                               //!< ip address of the first proxy (0.0.0.0 of not available)
     120    IP                 proxy2;                               //!< ip address of the second proxy (0.0.0.0 of not available)
    122121};
    123122
Note: See TracChangeset for help on using the changeset viewer.