62 [[nodiscard]]
static std::optional<IpAddress>
resolve(std::string_view address);
77 IpAddress(std::uint8_t byte0, std::uint8_t byte1, std::uint8_t byte2, std::uint8_t byte3);
179 std::uint32_t m_address;
#define SFML_NETWORK_API
Definition Export.hpp:42
Encapsulate an IPv4 network address.
Definition IpAddress.hpp:49
static std::optional< IpAddress > getLocalAddress()
Get the computer's local address.
static std::optional< IpAddress > getPublicAddress(Time timeout=Time::Zero)
Get the computer's public address.
static const IpAddress Any
Value representing any address (0.0.0.0).
Definition IpAddress.hpp:168
static std::optional< IpAddress > resolve(std::string_view address)
Construct the address from a null-terminated string view.
std::uint32_t toInteger() const
Get an integer representation of the address.
IpAddress(std::uint32_t address)
Construct the address from a 32-bits integer.
static const IpAddress LocalHost
The "localhost" address (for connecting a computer to itself locally).
Definition IpAddress.hpp:169
friend SFML_NETWORK_API bool operator<(IpAddress left, IpAddress right)
Overload of < operator to compare two IP addresses.
std::string toString() const
Get a string representation of the address.
static const IpAddress Broadcast
The "broadcast" address (for sending UDP messages to everyone on a local network).
Definition IpAddress.hpp:170
IpAddress(std::uint8_t byte0, std::uint8_t byte1, std::uint8_t byte2, std::uint8_t byte3)
Construct the address from 4 bytes.
Represents a time value.
Definition Time.hpp:42
static const Time Zero
Predefined "zero" time value.
Definition Time.hpp:110
Definition BlendMode.hpp:34
SFML_NETWORK_API bool operator<=(IpAddress left, IpAddress right)
Overload of <= operator to compare two IP addresses.
SFML_NETWORK_API bool operator!=(IpAddress left, IpAddress right)
Overload of != operator to compare two IP addresses.
SFML_NETWORK_API std::istream & operator>>(std::istream &stream, std::optional< IpAddress > &address)
Overload of >> operator to extract an IP address from an input stream.
SFML_NETWORK_API bool operator>(IpAddress left, IpAddress right)
Overload of > operator to compare two IP addresses.
SFML_NETWORK_API bool operator<(IpAddress left, IpAddress right)
Overload of < operator to compare two IP addresses.
SFML_NETWORK_API bool operator==(IpAddress left, IpAddress right)
Overload of == operator to compare two IP addresses.
SFML_NETWORK_API std::ostream & operator<<(std::ostream &stream, IpAddress address)
Overload of << operator to print an IP address to an output stream.
SFML_NETWORK_API bool operator>=(IpAddress left, IpAddress right)
Overload of >= operator to compare two IP addresses.