asio C++ library

PrevUpHomeNext

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

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 in dotted decimal format.

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

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: asio/ip/address.hpp

Convenience header: asio.hpp


PrevUpHomeNext