X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fnet%2Finet6.h;h=f6b0cf4187142b32938f828efcbed6c4d3a52ce9;hb=HEAD;hp=cc33e764936e4dbaaa4df8311774f6132407bbff;hpb=debe1004676d5431e571d9c4361072661dcc88c4;p=libs%2Fnet.git diff --git a/source/net/inet6.h b/source/net/inet6.h index cc33e76..f6b0cf4 100644 --- a/source/net/inet6.h +++ b/source/net/inet6.h @@ -1,28 +1,32 @@ #ifndef MSP_NET_INET6_H_ -#define NSP_NET_INET6_H_ +#define MSP_NET_INET6_H_ +#include "mspnet_api.h" #include "sockaddr.h" namespace Msp { namespace Net { -class Inet6Addr: public SockAddr +class MSPNET_API Inet6Addr: public SockAddr { private: - unsigned char addr[16]; - unsigned port; + unsigned char addr[16] = { }; + unsigned port = 0; public: - Inet6Addr(); + Inet6Addr() = default; Inet6Addr(const SysAddr &); - virtual Inet6Addr *copy() const { return new Inet6Addr(*this); } + static Inet6Addr wildcard(unsigned); + static Inet6Addr localhost(unsigned); - virtual SysAddr to_sys() const; + Inet6Addr *copy() const override { return new Inet6Addr(*this); } - virtual Family get_family() const { return INET6; } + SysAddr to_sys() const override; + + Family get_family() const override { return INET6; } unsigned get_port() const { return port; } - virtual std::string str() const; + std::string str() const override; }; } // namespace Net