X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fnet%2Fsockaddr.h;fp=source%2Fnet%2Fsockaddr.h;h=aad5e29065e5695ff6b8794cf5dd95f5696e2dc3;hb=50e9f9ea7f7385a2c5931fca2b8fb1103078e67c;hp=0000000000000000000000000000000000000000;hpb=21c596567e3b6fd794ed6af73d304ce2bc70e58f;p=libs%2Fnet.git diff --git a/source/net/sockaddr.h b/source/net/sockaddr.h new file mode 100644 index 0000000..aad5e29 --- /dev/null +++ b/source/net/sockaddr.h @@ -0,0 +1,32 @@ +#ifndef MSP_NET_SOCKADDR_H_ +#define MSP_NET_SOCKADDR_H_ + +#include +#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