- Timestamp:
- Jul 20, 2006, 11:29:35 AM (18 years ago)
- Location:
- branches/proxy/src/lib/network
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/proxy/src/lib/network/ip.cc
r9337 r9344 106 106 const IP& IP::operator=(const IP& ip) 107 107 { 108 this->_ip = ip. ip();108 this->_ip = ip.host(); 109 109 this->_port = ip.port(); 110 110 return *this; … … 132 132 bool IP::operator==(const IP& ip) 133 133 { 134 return (this->_ip == ip. ip() &&134 return (this->_ip == ip.host() && 135 135 this->_port == ip.port()); 136 136 } … … 144 144 bool IP::operator!=(const IP& ip) 145 145 { 146 return (this->_ip != ip. ip() ||146 return (this->_ip != ip.host() || 147 147 this->_port != ip.port()); 148 148 } -
branches/proxy/src/lib/network/ip.h
r9334 r9344 35 35 /// RETRIVEAL 36 36 /** @returns the IP */ 37 int ip() const { return this->_ip; };37 int host() const { return this->_ip; }; 38 38 /** @returns the Port */ 39 39 short port() const { return this->_port; }; -
branches/proxy/src/lib/network/synchronizeable_var/synchronizeable_ip.cc
r9338 r9344 47 47 int res; 48 48 49 res = Converter::intToByteArray( (int)vPtrIn-> ip(), buf, maxLength );49 res = Converter::intToByteArray( (int)vPtrIn->host(), buf, maxLength ); 50 50 assert(res > 0); 51 51 n += res; … … 75 75 int n = 0; 76 76 77 IP old IP= *vPtrOut;77 IP oldVal = *vPtrOut; 78 78 79 79 res = Converter::byteArrayToInt( buf + n, &host); … … 88 88 *this->vPtrOut = IP(host, port); 89 89 90 printf(" vtrp out old: %i, %i -- new: %i, %i\n", old IP.ip(), oldIP.port(), this->vPtrOut->ip(), this->vPtrOut->port());91 setHasChanged( *this->vPtrOut != old IP);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); 92 92 93 93 assert( n == 2 * INTSIZE); … … 102 102 void SynchronizeableIP::SynchronizeableIP::debug( ) 103 103 { 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()); 105 105 } 106 106
Note: See TracChangeset
for help on using the changeset viewer.