diff options
Diffstat (limited to 'include/SFML/Network/IpAddress.hpp')
-rw-r--r-- | include/SFML/Network/IpAddress.hpp | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/include/SFML/Network/IpAddress.hpp b/include/SFML/Network/IpAddress.hpp index 8205e9f..b6852a2 100644 --- a/include/SFML/Network/IpAddress.hpp +++ b/include/SFML/Network/IpAddress.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2015 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2016 Laurent Gomila (laurent@sfml-dev.org) // // This software is provided 'as-is', without any express or implied warranty. // In no event will the authors be held liable for any damages arising from the use of this software. @@ -99,7 +99,7 @@ public: /// This constructor uses the internal representation of /// the address directly. It should be used for optimization /// purposes, and only if you got that representation from - /// IpAddress::ToInteger(). + /// IpAddress::toInteger(). /// /// \param address 4 bytes of the address packed into a 32-bits integer /// @@ -182,15 +182,27 @@ public: // Static member data //////////////////////////////////////////////////////////// static const IpAddress None; ///< Value representing an empty/invalid address + static const IpAddress Any; ///< Value representing any address (0.0.0.0) static const IpAddress LocalHost; ///< The "localhost" address (for connecting a computer to itself locally) static const IpAddress Broadcast; ///< The "broadcast" address (for sending UDP messages to everyone on a local network) private: + friend SFML_NETWORK_API bool operator <(const IpAddress& left, const IpAddress& right); + + //////////////////////////////////////////////////////////// + /// \brief Resolve the given address string + /// + /// \param address Address string + /// + //////////////////////////////////////////////////////////// + void resolve(const std::string& address); + //////////////////////////////////////////////////////////// // Member data //////////////////////////////////////////////////////////// Uint32 m_address; ///< Address stored as an unsigned 32 bits integer + bool m_valid; ///< Is the address valid? }; //////////////////////////////////////////////////////////// |