]> git.tdb.fi Git - libs/net.git/blobdiff - source/net/unix.h
Add a dynamic receiver class for more flexible packet handling
[libs/net.git] / source / net / unix.h
index 821e915f0154d814163621ee4e47371ff70daf96..86f1dddf1ea9647bc8a55b43b156658d67677510 100644 (file)
@@ -1,28 +1,29 @@
 #ifndef MSP_NET_UNIX_H_
 #define MSP_NET_UNIX_H_
 
+#include "mspnet_api.h"
 #include "sockaddr.h"
 
 namespace Msp {
 namespace Net {
 
-class UnixAddr: public SockAddr
+class MSPNET_API UnixAddr: public SockAddr
 {
 private:
        std::string path;
-       bool abstract;
+       bool abstract = false;
 
 public:
-       UnixAddr();
+       UnixAddr() = default;
        UnixAddr(const SysAddr &);
        UnixAddr(const std::string &, bool = false);
 
-       virtual UnixAddr *copy() const { return new UnixAddr(*this); }
+       UnixAddr *copy() const override { return new UnixAddr(*this); }
 
-       virtual SysAddr to_sys() const;
+       SysAddr to_sys() const override;
 
-       virtual Family get_family() const { return UNIX; }
-       virtual std::string str() const;
+       Family get_family() const override { return UNIX; }
+       std::string str() const override;
 };
 
 } // namespace Net