]> git.tdb.fi Git - libs/net.git/blob - source/net/sockaddr.h
Implement an asynchronous name resolver class
[libs/net.git] / source / net / sockaddr.h
1 #ifndef MSP_NET_SOCKADDR_H_
2 #define MSP_NET_SOCKADDR_H_
3
4 #include <string>
5 #include "constants.h"
6
7 namespace Msp {
8 namespace Net {
9
10 class SockAddr
11 {
12 public:
13         struct SysAddr;
14
15 protected:
16         SockAddr() { }
17 public:
18         virtual ~SockAddr() { }
19
20         virtual SockAddr *copy() const = 0;
21
22         static SockAddr *new_from_sys(const SysAddr &);
23         virtual SysAddr to_sys() const = 0;
24
25         virtual Family get_family() const = 0;
26         virtual std::string str() const = 0;
27 };
28
29 } // namespace Net
30 } // namespace Msp
31
32 #endif