]> git.tdb.fi Git - libs/net.git/blobdiff - source/inet.h
Reorder class members
[libs/net.git] / source / inet.h
index 1092bc1a8372fbd6e473ebcb4b8007d1079efc52..56b9f4d06a91092baf6d2b26d3d849a2e051a2a3 100644 (file)
@@ -29,19 +29,21 @@ Address class for IPv4 sockets.
 */
 class InetAddr: public SockAddr
 {
+private:
+       in_addr_t   addr;
+       in_port_t   port;
+
 public:
        InetAddr();
        InetAddr(sockaddr_in &);
        InetAddr(in_addr_t, in_port_t);
+
        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;
-       unsigned    fill_sockaddr(sockaddr &) const;
-       InetAddr    *copy() const { return new InetAddr(*this); }
-private:
-       in_addr_t   addr;
-       in_port_t   port;
+       virtual unsigned fill_sockaddr(sockaddr &) const;
+       virtual InetAddr *copy() const { return new InetAddr(*this); }
 };
 
 } // namespace Net