Changeset 9321 in orxonox.OLD for branches/proxy/src/lib/network/ip.h
- Timestamp:
- Jul 18, 2006, 11:30:12 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/proxy/src/lib/network/ip.h
r9311 r9321 22 22 /// CONSTRUCTORS 23 23 IP(); 24 IP(int ip, int port); 25 IP(const std::string& ip, bool resolve = true); 24 26 IP(const std::string& ip, int port = -1, bool resolve = true); 25 IP(int ip, int port);26 27 IP(const IPaddress& ip); 27 28 IP(const IP& ip); … … 31 32 bool operator==(const IP& ip); 32 33 33 /// RETRI EAL34 /// RETRIVEAL 34 35 /** @returns the IP */ 35 36 int ip() const { return this->_ip; }; … … 40 41 std::string ipString() const; 41 42 43 void debug() const; 44 42 45 public: 43 44 46 /// SETUP 45 47 static IP stringToIP(const std::string& ip, int port = -1, bool resolve = true); 46 47 48 48 49 static std::string ipToString(const IPaddress& ipaddr); 49 50 static std::string ipToString(int ip, int port = -1); 50 51 52 53 static void setDefaultPort(short defaultPort); 54 static short defaultPort(short defaultPort) { return IP::_defaultPort; }; 55 51 56 private: 52 int _ip; //!< The IP in int form.53 short _port; //!< The Port number of the IP57 int _ip; //!< The IP in int form. 58 short _port; //!< The Port number of the IP 54 59 60 61 static short _defaultPort; //!< Default Port 55 62 }; 56 63
Note: See TracChangeset
for help on using the changeset viewer.