/**************************************************************************** Copyright (c) 2009, Radon Labs GmbH Copyright (c) 2011-2013,WebJet Business Division,CYOU http://www.genesis-3d.com.cn Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ #pragma once //------------------------------------------------------------------------------ /** @class Net::IpAddress Represents an IP address, consisting of a IPv4 host address and a port number. Can extract address information from an URI and automatically converts host names to addresses, and offers the special hostnames "localhost", "any", "broadcast", "self" and "inetself" where: - "localhost" will translate to 127.0.0.1 - "any" will translate to INADDR_ANY, which is 0.0.0.0 - "broadcast" will translate to INADDR_BROADCAST, which is 255.255.255.255 - "self" will translate to the first valid tcp/ip address for this host (there may be more then one address bound to the host) - "inetself" will translate to the first host address which is not a LAN address (which is not a class A, B, or C network) if none such exists the address will fall back to "self" (C) 2006 Radon Labs GmbH */ #if (__WIN32__ || __XBOX360__) #include "net/win360/win360ipaddress.h" namespace Net { typedef Win360::Win360IpAddress IpAddress; } #elif __WII__ // class is just an empty stub on Wii #include "net/wii/wiiipaddress.h" namespace Net { typedef Wii::WiiIpAddress IpAddress; } #elif __PS3__ #include "net/ps3/ps3ipaddress.h" namespace Net { typedef PS3::PS3IpAddress IpAddress; } #elif __ANDROID__ #include "net/android/androidipaddress.h" namespace Net { typedef Android::AndroidIpAddress IpAddress; } #elif __OSX__ #include "net/osx/osxipaddress.h" namespace Net { typedef OSX::OSXIpAddress IpAddress; } #else #error "IpAddress class not implemented on this platform" #endif //------------------------------------------------------------------------------