Main Page | Modules | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

inet_factory.h

Go to the documentation of this file.
00001 // -*- Socket Streams -*-
00002 
00003 // Copyright (C) 2003, 2004, 2005 Pedro LamarĂ£o <pedro.lamarao@mndfck.org>
00004 
00005 // This file is part of the Socket Streams Library.  This library is free
00006 // software; you can redistribute it and/or modify it under the
00007 // terms of the GNU Lesser General Public License as published by the
00008 // Free Software Foundation; either version 2.1 of the License
00009 // or (at your option) any later version.
00010 
00011 // This library is distributed in the hope that it will be useful,
00012 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014 // GNU Lesser General Public License for more details.
00015 
00016 // You should have received a copy of the GNU Lesser General Public License along
00017 // with this library; see the file COPYING. If not, write to the Free
00018 // Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307,
00019 // USA
00020 
00025 #ifndef SOCKETSTREAM_INET_ADDRESS_H
00026 #define SOCKETSTREAM_INET_ADDRESS_H 1
00027 
00028 #include <socketstream/config.h>
00029 
00030 #ifndef WIN32
00031 # include <netinet/in.h>
00032 #endif
00033 
00034 namespace ss {
00035 
00039         class SOCKETSTREAM_API ipv4_address : protected sockaddr_in
00040         {
00041         public:
00042 
00046                 typedef sockaddr_in sockaddr_t;
00047 
00051                 static const int AF = AF_INET;
00052 
00056                 static const in_addr any;
00057 
00061                 static const in_addr loopback;
00062 
00066                 ipv4_address ();
00067 
00079                 ipv4_address (in_addr const& address, unsigned short port);
00080 
00084                 ipv4_address (ipv4_address const& that);
00085 
00089                 ipv4_address (sockaddr_in const& that);
00090 
00096                 ipv4_address (sockaddr const& that);
00097 
00101                 ipv4_address& operator= (ipv4_address const& that);
00102 
00106                 ipv4_address& operator= (sockaddr_in const& that);
00107 
00113                 ipv4_address& operator= (sockaddr const& that);
00114 
00115         };
00116 
00117 }
00118 
00119 #endif // SOCKETSTREAM_INET_ADDRESS_H

Generated on Sat May 21 21:25:32 2005 for Socket Streams Library by  doxygen 1.4.3