| Home | Libraries | People | FAQ | More

### ip::address

Implements version-independent IP addresses.

    class address

##### Member Functions

Name | Description
--- | ---
address | Default constructor. — Construct an address from an IPv4 address. — Construct an address from an IPv6 address. — Copy constructor.
from_string | (Deprecated: Use make_address().) Create an address from an IPv4 address string in dotted decimal form, or from an IPv6 address in hexadecimal notation.
is_loopback | Determine whether the address is a loopback address.
is_multicast | Determine whether the address is a multicast address.
is_unspecified | Determine whether the address is unspecified.
is_v4 | Get whether the address is an IP version 4 address.
is_v6 | Get whether the address is an IP version 6 address.
operator= | Assign from another address. — Assign from an IPv4 address. — Assign from an IPv6 address.
to_string | Get the address as a string. — (Deprecated: Use other overload.) Get the address as a string.
to_v4 | Get the address as an IP version 4 address.
to_v6 | Get the address as an IP version 6 address.

##### Friends

Name | Description
--- | ---
operator!= | Compare two addresses for inequality.
operator< | Compare addresses for ordering.
operator<= | Compare addresses for ordering.
operator== | Compare two addresses for equality.
operator> | Compare addresses for ordering.
operator>= | Compare addresses for ordering.

##### Related Functions

Name | Description
--- | ---
make_address | Create an address from an IPv4 address string in dotted decimal form, or from an IPv6 address in hexadecimal notation.
operator<< | Output an address as a string.

The `ip::address` class provides the ability to use either IP version 4 or version 6 addresses.

##### Thread Safety

Distinct objects: Safe.

Shared objects: Unsafe.

##### Requirements

Header: `boost/asio/ip/address.hpp`

Convenience header: `boost/asio.hpp`