43 #ifdef _WIN32 |
43 #ifdef _WIN32 |
44 typedef ADDRINFOA AddrInfo; |
44 typedef ADDRINFOA AddrInfo; |
45 #else |
45 #else |
46 typedef struct addrinfo AddrInfo; |
46 typedef struct addrinfo AddrInfo; |
47 #endif |
47 #endif |
48 |
|
49 // ----------------------------------------------------------------------------- |
|
50 // |
|
51 IPAddress::IPAddress() : |
|
52 host (0), |
|
53 port (0) {} |
|
54 |
|
55 // ----------------------------------------------------------------------------- |
|
56 // |
|
57 IPAddress::IPAddress (unsigned long host, unsigned short port) : |
|
58 host (host), |
|
59 port (port) {} |
|
60 |
|
61 // ----------------------------------------------------------------------------- |
|
62 // |
|
63 IPAddress::IPAddress (const IPAddress& other) : |
|
64 host (other.host), |
|
65 port (other.port) {} |
|
66 |
48 |
67 // ----------------------------------------------------------------------------- |
49 // ----------------------------------------------------------------------------- |
68 // |
50 // |
69 std::string IPAddress::to_string (WithPort withport) const |
51 std::string IPAddress::to_string (WithPort withport) const |
70 { |
52 { |