|
ASIO_DECL | address () ASIO_NOEXCEPT |
| Default constructor.
|
|
ASIO_DECL | address (const asio::ip::address_v4 &ipv4_address) ASIO_NOEXCEPT |
| Construct an address from an IPv4 address.
|
|
ASIO_DECL | address (const asio::ip::address_v6 &ipv6_address) ASIO_NOEXCEPT |
| Construct an address from an IPv6 address.
|
|
ASIO_DECL | address (const address &other) ASIO_NOEXCEPT |
| Copy constructor.
|
|
ASIO_DECL address & | operator= (const address &other) ASIO_NOEXCEPT |
| Assign from another address.
|
|
ASIO_DECL address & | operator= (const asio::ip::address_v4 &ipv4_address) ASIO_NOEXCEPT |
| Assign from an IPv4 address.
|
|
ASIO_DECL address & | operator= (const asio::ip::address_v6 &ipv6_address) ASIO_NOEXCEPT |
| Assign from an IPv6 address.
|
|
bool | is_v4 () const ASIO_NOEXCEPT |
| Get whether the address is an IP version 4 address.
|
|
bool | is_v6 () const ASIO_NOEXCEPT |
| Get whether the address is an IP version 6 address.
|
|
ASIO_DECL asio::ip::address_v4 | to_v4 () const |
| Get the address as an IP version 4 address.
|
|
ASIO_DECL asio::ip::address_v6 | to_v6 () const |
| Get the address as an IP version 6 address.
|
|
ASIO_DECL std::string | to_string () const |
| Get the address as a string.
|
|
ASIO_DECL std::string | to_string (asio::error_code &ec) const |
| (Deprecated: Use other overload.) Get the address as a string.
|
|
ASIO_DECL bool | is_loopback () const ASIO_NOEXCEPT |
| Determine whether the address is a loopback address.
|
|
ASIO_DECL bool | is_unspecified () const ASIO_NOEXCEPT |
| Determine whether the address is unspecified.
|
|
ASIO_DECL bool | is_multicast () const ASIO_NOEXCEPT |
| Determine whether the address is a multicast address.
|
|
|
(Note that these are not member functions.)
|
ASIO_DECL address | make_address (const char *str) |
| Create an address from an IPv4 address string in dotted decimal form, or from an IPv6 address in hexadecimal notation.
|
|
ASIO_DECL address | make_address (const char *str, asio::error_code &ec) ASIO_NOEXCEPT |
| Create an address from an IPv4 address string in dotted decimal form, or from an IPv6 address in hexadecimal notation.
|
|
ASIO_DECL address | make_address (const std::string &str) |
| Create an address from an IPv4 address string in dotted decimal form, or from an IPv6 address in hexadecimal notation.
|
|
ASIO_DECL address | make_address (const std::string &str, asio::error_code &ec) ASIO_NOEXCEPT |
| Create an address from an IPv4 address string in dotted decimal form, or from an IPv6 address in hexadecimal notation.
|
|
template<typename Elem , typename Traits > |
std::basic_ostream< Elem, Traits > & | operator<< (std::basic_ostream< Elem, Traits > &os, const address &addr) |
| Output an address as a string. More...
|
|
Implements version-independent IP addresses.
The asio::ip::address class provides the ability to use either IP version 4 or version 6 addresses.
- Thread Safety
- Distinct objects: Safe.
Shared objects: Unsafe.