X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fnet%2Funix.h;fp=source%2Fnet%2Funix.h;h=821e915f0154d814163621ee4e47371ff70daf96;hb=b5f2e718a2fd3d2e7422476e70ca7b1de5e32175;hp=0000000000000000000000000000000000000000;hpb=3840d5d193327059b84406ee6b0ba263f5ef2401;p=libs%2Fnet.git diff --git a/source/net/unix.h b/source/net/unix.h new file mode 100644 index 0000000..821e915 --- /dev/null +++ b/source/net/unix.h @@ -0,0 +1,31 @@ +#ifndef MSP_NET_UNIX_H_ +#define MSP_NET_UNIX_H_ + +#include "sockaddr.h" + +namespace Msp { +namespace Net { + +class UnixAddr: public SockAddr +{ +private: + std::string path; + bool abstract; + +public: + UnixAddr(); + UnixAddr(const SysAddr &); + UnixAddr(const std::string &, bool = false); + + virtual UnixAddr *copy() const { return new UnixAddr(*this); } + + virtual SysAddr to_sys() const; + + virtual Family get_family() const { return UNIX; } + virtual std::string str() const; +}; + +} // namespace Net +} // namespace Msp + +#endif