X-Git-Url: http://git.tdb.fi/?p=libs%2Fnet.git;a=blobdiff_plain;f=source%2Finet.h;h=75735a7f36e1cf3e536dadf0b6d4915e26cb1fcd;hp=a65813bbd6af8698ed728fbd3dd2b998c685cc1c;hb=28e7bf7a13656620452e19d017ea5eedf14a8bc5;hpb=a81c41acd873cda7f40bca634782230d9e57dc4f diff --git a/source/inet.h b/source/inet.h index a65813b..75735a7 100644 --- a/source/inet.h +++ b/source/inet.h @@ -30,12 +30,13 @@ public: InetAddr(const sockaddr_in &); InetAddr(in_addr_t, in_port_t); + virtual InetAddr *copy() const { return new InetAddr(*this); } + Family get_family() const { return INET; } in_addr_t get_addr() const { return ntohl(addr); } in_port_t get_port() const { return ntohs(port); } std::string str() const; virtual unsigned fill_sockaddr(sockaddr &) const; - virtual InetAddr *copy() const { return new InetAddr(*this); } }; } // namespace Net