Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9334 in orxonox.OLD for branches/proxy/src/lib/network/ip.cc


Ignore:
Timestamp:
Jul 19, 2006, 10:29:14 PM (18 years ago)
Author:
patrick
Message:

work of the day in one commit:D

  • switched whole network framework to ip sturcture
  • extended ip structrue a little bit
  • reimplemented the disconnection/reconnection algorithm
  • synchronizeable ip bug discovered and solved
File:
1 edited

Legend:

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

    r9321 r9334  
    44 *
    55 * code taken from audiere.
     6 *
     7 *
     8   orxonox - the future of 3D-vertical-scrollers
     9
     10   Copyright (C) 2004 orx
     11
     12   This program is free software; you can redistribute it and/or modify
     13   it under the terms of the GNU General Public License as published by
     14   the Free Software Foundation; either version 2, or (at your option)
     15   any later version.
     16
     17### File Specific:
     18   main-programmer: Benjamin Grauer
     19 * co-programmer: Patrick Boenzli
    620 */
    721
     
    97111}
    98112
     113
     114/**
     115 * @brief copy operator
     116 * @param ip the IP to copy.
     117 * @return self.
     118 */
     119const IP& IP::operator=(const IPaddress& ip)
     120{
     121  this->_ip = ip.host;
     122  this->_port = ip.port;
     123  return *this;
     124}
     125
     126
    99127/**
    100128 * @brief comparison operator
     
    106134  return (this->_ip == ip.ip() &&
    107135          this->_port == ip.port());
     136}
     137
     138
     139/**
     140 * @brief comparison operator
     141 * @param ip the IP to compare
     142 * @return true if ip _and_ port do not match.
     143 */
     144bool IP::operator!=(const IP& ip)
     145{
     146  return (this->_ip != ip.ip() ||
     147      this->_port != ip.port());
    108148}
    109149
Note: See TracChangeset for help on using the changeset viewer.