Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9296 in orxonox.OLD for branches/proxy/src/lib/network


Ignore:
Timestamp:
Jul 14, 2006, 3:01:37 PM (18 years ago)
Author:
patrick
Message:

redirection flag added, proxy settings as a way to get/save the server settings

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

Legend:

Unmodified
Added
Removed
  • branches/proxy/src/lib/network/Makefile.am

    r9293 r9296  
    2525                      player_stats.cc \
    2626                      udp_broadcast.cc \
     27                      \
     28                      proxy/proxy_settings.cc \
    2729                      \
    2830                      monitor/connection_monitor.cc \
     
    6668                 udp_broadcast.h \
    6769                 \
     70                 proxy/proxy_settings.cc \
     71                 \
    6872                 monitor/connection_monitor.h \
    6973                 monitor/network_monitor.h \
  • branches/proxy/src/lib/network/handshake.cc

    r9295 r9296  
    4747  registerVar( new SynchronizeableString( &localState.preferedNickName, &remoteState.preferedNickName, "preferedNickName", PERMISSION_ALL ) );
    4848  registerVar( new SynchronizeableIP( &localState.proxy1, &remoteState.proxy1, "proxy server 1", PERMISSION_ALL ) );
     49  registerVar( new SynchronizeableIP( &localState.proxy2, &remoteState.proxy1, "proxy server 2", PERMISSION_ALL ) );
    4950
    5051  // init the local state
     
    5960  localState.nodeType = nodeType;
    6061  localState.canDel = 0;
     62  localState.redirectProxy = 0;
    6163
    6264  remoteState.completed = 0;
     
    7072  remoteState.nodeType = NET_CLIENT;
    7173  remoteState.canDel = 0;
     74  remoteState.redirectProxy = 0;
    7275
    7376  // activate the synchronization process
     
    7578  PRINTF(0)("Handshake created clientId = %d\n", clientId);
    7679}
     80
    7781
    7882/**
     
    125129    }
    126130
    127 
    128131    // cancel
    129132    if ( *it == candel_id )
  • branches/proxy/src/lib/network/handshake.h

    r9295 r9296  
    3131  std::string   preferedNickName;              //!< prefered nick name
    3232
    33   int           freeSlots;                     //!< true if there are still free slots on this server
     33  int           redirectProxy;                 //!< true if the client should reconnect to a proxy server (either 1 or 2 )
    3434  IPaddress     proxy1;                        //!< ip address of the first proxy (0.0.0.0 of not available)
    3535  IPaddress     proxy2;                        //!< ip address of the second proxy (0.0.0.0 of not available)
     
    7373    inline std::string getPreferedNickName(){ return remoteState.preferedNickName; }
    7474
     75    /** @returns if true the local client should reconnect to a proxy server from the proxy server list */
     76    inline bool redirect() { return this->remoteState.redirectProxy;}
     77
    7578    /** @param address: the address of the proxy server 1 if any */
    7679    inline void setProxy1Address(IPaddress address) { this->localState.proxy1 = address; }
  • branches/proxy/src/lib/network/monitor/network_monitor.h

    r9295 r9296  
    5656    inline bool gotFreeSlots() { return (this->localNode->getPlayerNumber() < NET_MAX_CONNECTIONS)?true:false; }
    5757    /** @param node node to be checked for slots @returns true if there are still free network slots available at this node */
    58     inline bool gorFreeSlots(NetworkNode* node) { return (node->getPlayerNumber() < NET_MAX_CONNECTIONS)?true:false; }
     58    inline bool gotFreeSlots(NetworkNode* node) { return (node->getPlayerNumber() < NET_MAX_CONNECTIONS)?true:false; }
    5959    void getServerWithFreeSlots() { }
    6060
  • branches/proxy/src/lib/network/network_stream.cc

    r9291 r9296  
    191191
    192192  hs->setPreferedNickName( Preferences::getInstance()->getString( "multiplayer", "nickname", "Player" ) );
     193  //hs->set
    193194
    194195//   peers[0].handshake->setSynchronized( true );
Note: See TracChangeset for help on using the changeset viewer.