Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9360 in orxonox.OLD for branches/proxy/src/lib/network/ip.h


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/ip.h

    r9347 r9360  
    3636    /** @returns the IP */
    3737    int host() const { return this->_ip; };
     38    int* hostRef()  { return &this->_ip; }
    3839    /** @returns the Port */
    39     short port() const { return this->_port; };
     40    int port() const { return this->_port; };
     41    int* portRef() { return &this->_port; };
     42
    4043    inline IPaddress getSDLNotation() { IPaddress sdlIP; sdlIP.host = this->_ip; sdlIP.port = this->_port; return sdlIP; }
    4144
     
    5255    static std::string ipToString(int ip, int port = -1);
    5356
    54     static void setDefaultPort(short defaultPort);
    55     static short defaultPort(short defaultPort) { return IP::_defaultPort; };
     57    static void setDefaultPort(int defaultPort);
     58    static int defaultPort(int defaultPort) { return IP::_defaultPort; };
    5659
    5760  private:
    5861    int           _ip;           //!< The IP in int form.
    59     short         _port;         //!< The Port number of the IP
     62    int         _port;         //!< The Port number of the IP
    6063
    61     static short  _defaultPort;  //!< Default Port
     64    static int  _defaultPort;  //!< Default Port
    6265};
    6366
Note: See TracChangeset for help on using the changeset viewer.