]> git.tdb.fi Git - libs/net.git/blobdiff - source/net/sockaddr.h
Prepare for assimilating msphttp
[libs/net.git] / source / net / sockaddr.h
diff --git a/source/net/sockaddr.h b/source/net/sockaddr.h
new file mode 100644 (file)
index 0000000..aad5e29
--- /dev/null
@@ -0,0 +1,32 @@
+#ifndef MSP_NET_SOCKADDR_H_
+#define MSP_NET_SOCKADDR_H_
+
+#include <string>
+#include "constants.h"
+
+namespace Msp {
+namespace Net {
+
+class SockAddr
+{
+public:
+       struct SysAddr;
+
+protected:
+       SockAddr() { }
+public:
+       virtual ~SockAddr() { }
+
+       virtual SockAddr *copy() const = 0;
+
+       static SockAddr *new_from_sys(const SysAddr &);
+       virtual SysAddr to_sys() const = 0;
+
+       virtual Family get_family() const = 0;
+       virtual std::string str() const = 0;
+};
+
+} // namespace Net
+} // namespace Msp
+
+#endif