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