1 #ifndef MSP_NET_INET_H_
2 #define MSP_NET_INET_H_
4 #include "mspnet_api.h"
11 Address class for IPv4 sockets.
13 class MSPNET_API InetAddr: public SockAddr
16 unsigned char addr[4] = { };
21 InetAddr(const SysAddr &);
23 static InetAddr wildcard(unsigned);
24 static InetAddr localhost(unsigned);
26 InetAddr *copy() const override { return new InetAddr(*this); }
28 SysAddr to_sys() const override;
30 Family get_family() const override { return INET; }
31 unsigned get_port() const { return port; }
32 std::string str() const override;