Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of Boost. Click here to view this page for the latest version.
PrevUpHomeNext

any_address

(EXPERIMENTAL) A server address, identifying how to physically connect to a MySQL server.

Synopsis

Defined in header <boost/mysql/any_address.hpp>

class any_address
Member Functions

Name

Description

any_address [constructor]

Constructs an empty address.

Copy constructor.

Move constructor.

Constructs an address containing a host and a port.

Constructs an address containing a UNIX socket path.

emplace_host_and_port

Replaces the current object with a host and port.

emplace_unix_path

Replaces the current object with a UNIX socket path.

hostname

Retrieves the hostname that this object contains.

operator=

Copy assignment.

Move assignment.

operator==

Tests for equality.

operator!=

Tests for inequality.

port

Retrieves the port that this object contains.

type

Retrieves the type of address that this object contains.

unix_socket_path

Retrieves the UNIX socket path that this object contains.

~any_address [destructor]

Destructor.

Description

A variant-like type that can represent the network address of a MySQL server, regardless of the transport type being used. It can contain either a host and port (to connect using TCP) or a UNIX path (to connect using UNIX domain sockets).

This class may be extended in the future to accomodate Windows named pipes.

This type has value semantics: it is owning and regular.


PrevUpHomeNext