X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fnet%2Finet.h;h=d970559dab23fb628e61837275c1e0ba8ba807c5;hb=c2e9e03b191a6ffe44a83be32aadf2a325491c02;hp=67bb6100b66005191d923d3a4210a9ea82d4cd79;hpb=f97f21c17f24e1d426e5b5863676071a5809b185;p=libs%2Fnet.git diff --git a/source/net/inet.h b/source/net/inet.h index 67bb610..d970559 100644 --- a/source/net/inet.h +++ b/source/net/inet.h @@ -1,6 +1,7 @@ #ifndef MSP_NET_INET_H_ #define MSP_NET_INET_H_ +#include "mspnet_api.h" #include "sockaddr.h" namespace Msp { @@ -9,16 +10,19 @@ namespace Net { /** Address class for IPv4 sockets. */ -class InetAddr: public SockAddr +class MSPNET_API InetAddr: public SockAddr { private: - unsigned char addr[4]; - unsigned port; + unsigned char addr[4] = { }; + unsigned port = 0; public: - InetAddr(); + InetAddr() = default; InetAddr(const SysAddr &); + static InetAddr wildcard(unsigned); + static InetAddr localhost(unsigned); + InetAddr *copy() const override { return new InetAddr(*this); } SysAddr to_sys() const override;