|
libcaf
0.16.3
|
A node ID consists of a host ID and process ID. More...
#include <node_id.hpp>
Public Types | |
| using | host_id_type = std::array< uint8_t, host_id_size > |
| Represents a 160 bit hash. | |
Public Member Functions | |
| node_id (const node_id &)=default | |
| node_id (const none_t &) | |
| node_id & | operator= (const node_id &)=default |
| node_id & | operator= (const none_t &) |
| node_id (uint32_t procid, const std::string &hash) | |
Creates a node ID from process_id and hash. More... | |
| node_id (uint32_t procid, const host_id_type &hid) | |
Creates a node ID from process_id and hash. More... | |
| uint32_t | process_id () const |
| Identifies the running process. More... | |
| const host_id_type & | host_id () const |
| Identifies the host system. More... | |
| operator bool () const | |
| Queries whether this node is not default-constructed. | |
| void | swap (node_id &) |
Static Public Attributes | |
| static constexpr size_t | host_id_size = 20 |
| A 160 bit hash (20 bytes). | |
| static constexpr size_t | serialized_size = host_id_size + sizeof(uint32_t) |
The size of a node_id in serialized form. | |
Related Functions | |
(Note that these are not member functions.) | |
| bool | operator== (const node_id &x, none_t) |
| bool | operator== (none_t, const node_id &x) |
| bool | operator!= (const node_id &x, none_t) |
| bool | operator!= (none_t, const node_id &x) |
| std::string | to_string (const node_id &x) |
Converts x into a human-readable string representation. | |
| void | append_to_string (std::string &x, const node_id &y) |
Appends y in human-readable string representation to x. | |
A node ID consists of a host ID and process ID.
The host ID identifies the physical machine in the network, whereas the process ID identifies the running system-level process on that machine.
| caf::node_id::node_id | ( | uint32_t | procid, |
| const std::string & | hash | ||
| ) |
Creates a node ID from process_id and hash.
| procid | System-wide unique process identifier. |
| hash | Unique node id as hexadecimal string representation. |
| caf::node_id::node_id | ( | uint32_t | procid, |
| const host_id_type & | hid | ||
| ) |
Creates a node ID from process_id and hash.
| procid | System-wide unique process identifier. |
| hid | Unique node id. |
| const host_id_type& caf::node_id::host_id | ( | ) | const |
Identifies the host system.
| uint32_t caf::node_id::process_id | ( | ) | const |
Identifies the running process.
1.8.16