25#ifndef SFML_IPADDRESS_HPP
26#define SFML_IPADDRESS_HPP
31#include <SFML/Network/Export.hpp>
32#include <SFML/System/Time.hpp>
94 IpAddress(Uint8 byte0, Uint8 byte1, Uint8 byte2, Uint8 byte3);
199 void resolve(
const std::string& address);
283SFML_NETWORK_API std::istream& operator >>(std::istream& stream,
IpAddress& address);
294SFML_NETWORK_API std::ostream& operator <<(std::ostream& stream,
const IpAddress& 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.