11 #ifndef ASIO_IP_ADDRESS_HPP 12 #define ASIO_IP_ADDRESS_HPP 14 #if defined(_MSC_VER) && (_MSC_VER >= 1200) 16 #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 24 #if !defined(ASIO_NO_IOSTREAM) 26 #endif // !defined(ASIO_NO_IOSTREAM) 57 #if defined(ASIO_HAS_MOVE) 60 #endif // defined(ASIO_HAS_MOVE) 65 #if defined(ASIO_HAS_MOVE) 68 #endif // defined(ASIO_HAS_MOVE) 142 friend bool operator>(
const address& a1,
const address& a2)
161 enum { ipv4, ipv6 } type_;
170 #if !defined(ASIO_NO_IOSTREAM) 184 template <
typename Elem,
typename Traits>
186 std::basic_ostream<Elem, Traits>& os,
const address& addr);
188 #endif // !defined(ASIO_NO_IOSTREAM) 196 #if defined(ASIO_HEADER_ONLY) 198 #endif // defined(ASIO_HEADER_ONLY) 200 #endif // ASIO_IP_ADDRESS_HPP friend bool operator<=(const address &a1, const address &a2)
Compare addresses for ordering.
ASIO_DECL bool is_loopback() const
Determine whether the address is a loopback address.
ASIO_DECL std::string to_string() const
Get the address as a string in dotted decimal format.
ASIO_DECL friend bool operator==(const address &a1, const address &a2)
Compare two addresses for equality.
friend bool operator>(const address &a1, const address &a2)
Compare addresses for ordering.
ASIO_DECL friend bool operator<(const address &a1, const address &a2)
Compare addresses for ordering.
std::basic_ostream< Elem, Traits > & operator<<(std::basic_ostream< Elem, Traits > &os, const address &addr)
Output an address as a string.
Implements IP version 4 style addresses.
static ASIO_DECL address from_string(const char *str)
ASIO_DECL asio::ip::address_v6 to_v6() const
Get the address as an IP version 6 address.
ASIO_DECL address & operator=(const address &other)
Assign from another address.
ASIO_DECL asio::ip::address_v4 to_v4() const
Get the address as an IP version 4 address.
friend bool operator!=(const address &a1, const address &a2)
Compare two addresses for inequality.
Implements version-independent IP addresses.
ASIO_DECL address()
Default constructor.
Class to represent an error code value.
Implements IP version 6 style addresses.
ASIO_DECL bool is_unspecified() const
Determine whether the address is unspecified.
bool is_v4() const
Get whether the address is an IP version 4 address.
bool is_v6() const
Get whether the address is an IP version 6 address.
friend bool operator>=(const address &a1, const address &a2)
Compare addresses for ordering.
ASIO_DECL bool is_multicast() const
Determine whether the address is a multicast address.