X-Git-Url: http://git.tdb.fi/?p=libs%2Fnet.git;a=blobdiff_plain;f=source%2Finet.h;h=be67dee56bd71db14c8fef146d6b487fa77c352c;hp=56b9f4d06a91092baf6d2b26d3d849a2e051a2a3;hb=1b2aabf076169e6d2049227188e464e95ac40514;hpb=35009eb3f51a6fd0f9261f892a85d97d81e69886 diff --git a/source/inet.h b/source/inet.h index 56b9f4d..be67dee 100644 --- a/source/inet.h +++ b/source/inet.h @@ -1,7 +1,7 @@ /* $Id$ This file is part of libmspnet -Copyright © 2008 Mikkosoft Productions, Mikko Rasa +Copyright © 2008, 2011 Mikkosoft Productions, Mikko Rasa Distributed under the LGPL */ @@ -13,29 +13,28 @@ Distributed under the LGPL #else #include #endif -#include #include "sockaddr.h" namespace Msp { namespace Net { -#ifdef WIN32 -typedef u_long in_addr_t; -typedef u_short in_port_t; -#endif - /** Address class for IPv4 sockets. */ class InetAddr: public SockAddr { private: +#ifdef WIN32 + typedef u_long in_addr_t; + typedef u_short in_port_t; +#endif + in_addr_t addr; in_port_t port; public: InetAddr(); - InetAddr(sockaddr_in &); + InetAddr(const sockaddr_in &); InetAddr(in_addr_t, in_port_t); Family get_family() const { return INET; }