18 |
|
|
19 |
|
#else |
20 |
|
|
21 |
< |
#include <Winsock2.h> |
22 |
< |
#include <Ws2tcpip.h> |
21 |
> |
#include <winsock2.h> |
22 |
|
|
23 |
|
typedef unsigned long in_addr_t; |
24 |
|
|
33 |
|
#endif |
34 |
|
string host; |
35 |
|
string name; |
36 |
< |
struct in_addr* address; |
36 |
> |
struct in_addr address; |
37 |
|
string platform; |
38 |
|
public: |
39 |
|
Host(const string& host, const string& name = "", const string& address = |
45 |
|
void setPlatform(const string& platform) { this->platform = platform; } |
46 |
|
string getHost() const { return host; } |
47 |
|
string getName() const { return name; } |
48 |
< |
string getAddress() const { return inet_ntoa(*address); } |
48 |
> |
string getAddress() const { return inet_ntoa(address); } |
49 |
|
string getPlatform() const { return platform; } |
50 |
|
bool operator==(const Host& host) const; |
51 |
|
bool operator!=(const Host& host) const { return !(*this == host); } |