25#ifndef SFML_IPADDRESS_HPP
26#define SFML_IPADDRESS_HPP
199 void resolve(
const std::string& address);
Encapsulate an IPv4 network address.
IpAddress(Uint8 byte0, Uint8 byte1, Uint8 byte2, Uint8 byte3)
Construct the address from 4 bytes.
static const IpAddress Any
Value representing any address (0.0.0.0)
static const IpAddress None
Value representing an empty/invalid address.
static IpAddress getLocalAddress()
Get the computer's local address.
static const IpAddress LocalHost
The "localhost" address (for connecting a computer to itself locally)
static IpAddress getPublicAddress(Time timeout=Time::Zero)
Get the computer's public address.
IpAddress(const std::string &address)
Construct the address from a string.
std::string toString() const
Get a string representation of the address.
IpAddress(Uint32 address)
Construct the address from a 32-bits integer.
IpAddress(const char *address)
Construct the address from a string.
static const IpAddress Broadcast
The "broadcast" address (for sending UDP messages to everyone on a local network)
Uint32 toInteger() const
Get an integer representation of the address.
IpAddress()
Default constructor.
static const Time Zero
Predefined "zero" time value.
SFML_NETWORK_API bool operator>=(const IpAddress &left, const IpAddress &right)
Overload of >= operator to compare two IP addresses.
SFML_NETWORK_API bool operator<(const IpAddress &left, const IpAddress &right)
Overload of < operator to compare two IP addresses.
SFML_NETWORK_API bool operator>(const IpAddress &left, const IpAddress &right)
Overload of > operator to compare two IP addresses.
SFML_NETWORK_API std::istream & operator>>(std::istream &stream, IpAddress &address)
Overload of >> operator to extract an IP address from an input stream.
SFML_NETWORK_API bool operator==(const IpAddress &left, const IpAddress &right)
Overload of == operator to compare two IP addresses.
SFML_NETWORK_API bool operator!=(const IpAddress &left, const IpAddress &right)
Overload of != operator to compare two IP addresses.
SFML_NETWORK_API std::ostream & operator<<(std::ostream &stream, const IpAddress &address)
Overload of << operator to print an IP address to an output stream.
SFML_NETWORK_API bool operator<=(const IpAddress &left, const IpAddress &right)
Overload of <= operator to compare two IP addresses.