Stores routing information for a single broker participating as BASP peer and provides both direct and indirect paths.
More...
#include <routing_table.hpp>
|
using | node_id_set = std::unordered_set<node_id> |
|
|
| routing_table (abstract_broker *parent) |
|
std::optional< route > | lookup (const node_id &target) |
| Returns a route to target or none on error.
|
|
node_id | lookup_direct (const connection_handle &hdl) const |
| Returns the ID of the peer connected via hdl or none if hdl is unknown.
|
|
std::optional< connection_handle > | lookup_direct (const node_id &nid) const |
| Returns the handle offering a direct connection to nid or invalid_connection_handle if no direct connection to nid exists.
|
|
node_id | lookup_indirect (const node_id &nid) const |
| Returns the next hop that would be chosen for nid or none if there's no indirect route to nid .
|
|
void | add_direct (const connection_handle &hdl, const node_id &nid) |
| Adds a new direct route to the table.
|
|
bool | add_indirect (const node_id &hop, const node_id &dest) |
| Adds a new indirect route to the table.
|
|
node_id | erase_direct (const connection_handle &hdl) |
| Removes a direct connection and return the node ID that became unreachable as a result of this operation.
|
|
bool | erase_indirect (const node_id &dest) |
| Removes any entry for indirect connection to dest and returns true if dest had an indirect route, otherwise false .
|
|
abstract_broker * | parent () |
| Returns the parent broker.
|
|
Stores routing information for a single broker participating as BASP peer and provides both direct and indirect paths.
◆ add_direct()
Adds a new direct route to the table.
- Precondition
hdl != invalid_connection_handle && nid != none
The documentation for this class was generated from the following files:
- libcaf_io/caf/io/basp/routing_table.hpp
- libcaf_io/caf/io/basp/routing_table.cpp