]> git.tdb.fi Git - libs/net.git/blob - source/net/inet6.h
Use default member initializers where possible
[libs/net.git] / source / net / inet6.h
1 #ifndef MSP_NET_INET6_H_
2 #define NSP_NET_INET6_H_
3
4 #include "sockaddr.h"
5
6 namespace Msp {
7 namespace Net {
8
9 class Inet6Addr: public SockAddr
10 {
11 private:
12         unsigned char addr[16] = { };
13         unsigned port = 0;
14
15 public:
16         Inet6Addr() = default;
17         Inet6Addr(const SysAddr &);
18
19         Inet6Addr *copy() const override { return new Inet6Addr(*this); }
20
21         SysAddr to_sys() const override;
22
23         Family get_family() const override { return INET6; }
24         unsigned get_port() const { return port; }
25         std::string str() const override;
26 };
27
28 } // namespace Net
29 } // namespace Msp
30
31 #endif