Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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


Ignore:
Timestamp:
Jul 18, 2006, 11:30:12 AM (18 years ago)
Author:
bensch
Message:

more elaborate IP

File:
1 edited

Legend:

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

    r9311 r9321  
    2222    /// CONSTRUCTORS
    2323    IP();
     24    IP(int ip, int port);
     25    IP(const std::string& ip, bool resolve = true);
    2426    IP(const std::string& ip, int port = -1, bool resolve = true);
    25     IP(int ip, int port);
    2627    IP(const IPaddress& ip);
    2728    IP(const IP& ip);
     
    3132    bool operator==(const IP& ip);
    3233
    33     /// RETRIEAL
     34    /// RETRIVEAL
    3435    /** @returns the IP */
    3536    int ip() const { return this->_ip; };
     
    4041    std::string ipString() const;
    4142
     43    void debug() const;
     44
    4245  public:
    43 
    4446    /// SETUP
    4547    static IP stringToIP(const std::string& ip, int port = -1, bool resolve = true);
    46 
    4748
    4849    static std::string ipToString(const IPaddress& ipaddr);
    4950    static std::string ipToString(int ip, int port = -1);
    5051
     52
     53    static void setDefaultPort(short defaultPort);
     54    static short defaultPort(short defaultPort) { return IP::_defaultPort; };
     55
    5156  private:
    52     int           _ip;    //!< The IP in int form.
    53     short         _port;  //!< The Port number of the IP
     57    int           _ip;           //!< The IP in int form.
     58    short         _port;         //!< The Port number of the IP
    5459
     60
     61    static short  _defaultPort;  //!< Default Port
    5562};
    5663
Note: See TracChangeset for help on using the changeset viewer.