Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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


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

network ip synchronization work

File:
1 edited

Legend:

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

    r9353 r9360  
    4848  registerVar( new SynchronizeableString( &localState.preferedNickName, &remoteState.preferedNickName, "preferedNickName", PERMISSION_ALL ) );
    4949  // now synchronize only two of the available proxy server addresses
    50   proxy1Handler = registerVarId( new SynchronizeableIP( &localState.proxy1, &remoteState.proxy1, "proxy server 1", PERMISSION_ALL ) );
    51   proxy2Handler = registerVarId( new SynchronizeableIP( &localState.proxy2, &remoteState.proxy2, "proxy server 2", PERMISSION_ALL ) );
     50//   registerVar( new SynchronizeableIP( &this->proxy1, &this->proxy1, "proxy server 1", PERMISSION_ALL ) );
     51//   registerVar( new SynchronizeableIP( &this->proxy2, &this->proxy2, "proxy server 2", PERMISSION_ALL ) );
     52  registerVar( new SynchronizeableInt( this->proxy1.hostRef(), this->proxy1.hostRef(), "proxy server 1", PERMISSION_ALL));
     53  registerVar( new SynchronizeableInt( this->proxy1.portRef(), this->proxy1.portRef(), "proxy server 1", PERMISSION_ALL));
     54  registerVar( new SynchronizeableInt( this->proxy2.hostRef(), this->proxy2.hostRef(), "proxy server 2", PERMISSION_ALL));
     55  registerVar( new SynchronizeableInt( this->proxy2.portRef(), this->proxy2.portRef(), "proxy server 2", PERMISSION_ALL));
    5256
    5357  // init the local state
     
    6266  localState.nodeType = nodeType;
    6367  localState.canDel = 0;
    64   localState.redirectProxy = 0;
    65   localState.proxy1 = IP(0, 0);
    66   localState.proxy2 = IP (0, 0);
    6768
    6869
     
    7879  remoteState.nodeType = NET_CLIENT;
    7980  remoteState.canDel = 0;
    80   remoteState.redirectProxy = 0;
    81   remoteState.proxy1 = IP(0, 0);
    82   remoteState.proxy2 = IP(0, 0);
    8381
    8482
    85   this->proxyAddressesSynched = 0;
     83  this->proxyAddressesSynched = 2;
     84  this->proxy1 = IP(0, 0);
     85  this->proxy2 = IP(0, 0);
     86  this->redirectProxy = 0;
    8687
    8788
     
    151152    {
    152153      this->proxyAddressesSynched++;
    153       PRINTF(0)("got proxy1: %i, %i\n", this->remoteState.proxy1.host(), this->remoteState.proxy1.port());
     154      PRINTF(0)("got proxy1: %i, %i\n", this->proxy1.host(), this->proxy1.port());
    154155    }
    155156
     
    158159    {
    159160      this->proxyAddressesSynched++;
    160       PRINTF(0)("got proxy2: %i, %i\n", this->remoteState.proxy2.host(), this->remoteState.proxy2.port());
     161      PRINTF(0)("got proxy2: %i, %i\n", this->proxy2.host(), this->proxy2.port());
    161162    }
    162163
Note: See TracChangeset for help on using the changeset viewer.