Loading...
Searching...
No Matches
caf::io::network::interfaces Class Reference

Utility class bundling access to network interface names and addresses. More...

`#include <interfaces.hpp>`

## Public Types

using | consumer
| Consumes {interface_name, protocol_type, is_localhost, address} entries.

## Static Public Member Functions

static void | traverse (std::initializer_list< protocol::network > ps, consumer f)
| Traverses all network interfaces for given protocols using f.
static void | traverse (consumer f)
| Traverses all network interfaces using f.
static interfaces_map | list_all (bool include_localhost=true)
| Returns a map listing each interface by its name.
static address_listing | list_addresses (bool include_localhost=true)
| Returns all addresses for all devices for all protocols.
static std::vector< std::string > | list_addresses (std::initializer_list< protocol::network > procs, bool include_localhost=true)
| Returns all addresses for all devices for given protocols.
static std::vector< std::string > | list_addresses (protocol::network proc, bool include_localhost=true)
| Returns all addresses for all devices for given protocol.
static optional< std::pair< std::string, protocol::network > > | native_address (const std::string &host, optional< protocol::network > preferred=none)
| Returns a native IPv4 or IPv6 translation of host.
static std::vector< std::pair< std::string, protocol::network > > | server_address (uint16_t port, const char *host, optional< protocol::network > preferred=none)
| Returns the host and protocol available for a local server socket.
static bool | get_endpoint (const std::string &host, uint16_t port, ip_endpoint &ep, optional< protocol::network > preferred=none)
| Writes datagram endpoint info for host:port into ep.

## Detailed Description

Utility class bundling access to network interface names and addresses.

## Member Typedef Documentation

## consumer

using caf::io::network::interfaces::consumer

Initial value:
std::function<void (const char*, protocol::network,
bool, const char*)>
caf::io::network::protocol::network
network
Denotes a network protocol, i.e., IPv4 or IPv6.
Definition protocol.hpp:33

Consumes {interface_name, protocol_type, is_localhost, address} entries.

The documentation for this class was generated from the following file:

- /build/actor-framework-Z9pIPl/actor-framework-0.17.6/libcaf_io/caf/io/network/interfaces.hpp