10 SockAddr *SockAddr::create(const sockaddr_storage &sa)
15 return new InetAddr(reinterpret_cast<const sockaddr_in &>(sa));
17 return new Inet6Addr(reinterpret_cast<const sockaddr_in6 &>(sa));
19 throw invalid_argument("SockAddr::create");
23 unsigned SockAddr::fill_sockaddr(sockaddr_storage &sa) const
25 return fill_sockaddr(reinterpret_cast<sockaddr &>(sa));