Loading...
Searching...
No Matches
IpAddress.hpp
Go to the documentation of this file.
7// In no event will the authors be held liable for any damages arising from the use of this software.
257SFML_NETWORK_API std::istream& operator>>(std::istream& stream, std::optional<IpAddress>& address);
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 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
static const IpAddress Broadcast
The "broadcast" address (for sending UDP messages to everyone on a local network)
Definition IpAddress.hpp:170
friend bool operator<(IpAddress left, IpAddress right)
Overload of operator< to compare two IP addresses.
IpAddress(std::uint8_t byte0, std::uint8_t byte1, std::uint8_t byte2, std::uint8_t byte3)
Construct the address from 4 bytes.
Definition AudioResource.hpp:36
bool operator!=(IpAddress left, IpAddress right)
Overload of operator!= to compare two IP addresses.
bool operator<(IpAddress left, IpAddress right)
Overload of operator< to compare two IP addresses.
bool operator==(IpAddress left, IpAddress right)
Overload of operator== to compare two IP addresses.
bool operator>(IpAddress left, IpAddress right)
Overload of operator> to compare two IP addresses.
bool operator>=(IpAddress left, IpAddress right)
Overload of operator>= to compare two IP addresses.
std::istream & operator>>(std::istream &stream, std::optional< IpAddress > &address)
Overload of operator>> to extract an IP address from an input stream.
bool operator<=(IpAddress left, IpAddress right)
Overload of operator<= to compare two IP addresses.
std::ostream & operator<<(std::ostream &stream, IpAddress address)
Overload of operator<< to print an IP address to an output stream.