Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9344 in orxonox.OLD


Ignore:
Timestamp:
Jul 20, 2006, 11:29:35 AM (18 years ago)
Author:
patrick
Message:

changed interface of ip slighlu

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

Legend:

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

    r9337 r9344  
    106106const IP& IP::operator=(const IP& ip)
    107107{
    108   this->_ip = ip.ip();
     108  this->_ip = ip.host();
    109109  this->_port = ip.port();
    110110  return *this;
     
    132132bool IP::operator==(const IP& ip)
    133133{
    134   return (this->_ip == ip.ip() &&
     134  return (this->_ip == ip.host() &&
    135135          this->_port == ip.port());
    136136}
     
    144144bool IP::operator!=(const IP& ip)
    145145{
    146   return (this->_ip != ip.ip() ||
     146  return (this->_ip != ip.host() ||
    147147      this->_port != ip.port());
    148148}
  • branches/proxy/src/lib/network/ip.h

    r9334 r9344  
    3535    /// RETRIVEAL
    3636    /** @returns the IP */
    37     int ip() const { return this->_ip; };
     37    int host() const { return this->_ip; };
    3838    /** @returns the Port */
    3939    short port() const { return this->_port; };
  • branches/proxy/src/lib/network/synchronizeable_var/synchronizeable_ip.cc

    r9338 r9344  
    4747  int res;
    4848
    49   res = Converter::intToByteArray( (int)vPtrIn->ip(), buf, maxLength );
     49  res = Converter::intToByteArray( (int)vPtrIn->host(), buf, maxLength );
    5050  assert(res > 0);
    5151  n += res;
     
    7575  int n = 0;
    7676
    77   IP oldIP = *vPtrOut;
     77  IP oldVal = *vPtrOut;
    7878
    7979  res = Converter::byteArrayToInt( buf + n, &host);
     
    8888  *this->vPtrOut = IP(host, port);
    8989
    90   printf(" vtrp out old: %i, %i -- new: %i, %i\n", oldIP.ip(), oldIP.port(), this->vPtrOut->ip(), this->vPtrOut->port());
    91   setHasChanged( *this->vPtrOut != oldIP);
     90  printf(" vtrp out old: %i, %i -- new: %i, %i\n", oldVal.host(), oldVal.port(), this->vPtrOut->host(), this->vPtrOut->port());
     91  setHasChanged( *this->vPtrOut != oldVal);
    9292
    9393  assert( n == 2 * INTSIZE);
     
    102102void SynchronizeableIP::SynchronizeableIP::debug( )
    103103{
    104   printf("SYNCHRONIZEABLE_VAR: %s IN: %i, %i OUT: %i, %i\n", name.c_str(), vPtrIn->ip(), vPtrIn->port(), vPtrOut->ip(), vPtrOut->port());
     104  printf("SYNCHRONIZEABLE_VAR: %s IN: %i, %i OUT: %i, %i\n", name.c_str(), vPtrIn->host(), vPtrIn->port(), vPtrOut->host(), vPtrOut->port());
    105105}
    106106
Note: See TracChangeset for help on using the changeset viewer.