#include <physical_node_info.h>
A PhysicalNodeInfo represents the remote host, by having a IPv4/IPv6 IP address and a port
◆ PhysicalNodeInfo() [1/2]
minhton::PhysicalNodeInfo::PhysicalNodeInfo |
( |
| ) |
|
|
default |
◆ PhysicalNodeInfo() [2/2]
minhton::PhysicalNodeInfo::PhysicalNodeInfo |
( |
const std::string & |
address, |
|
|
uint16_t |
port |
|
) |
| |
Constructing an initialized PhysicalNodeInfo object with the given information.
- Parameters
-
address | valid IPv4address string |
port | valid port number |
◆ getAddress()
std::string minhton::PhysicalNodeInfo::getAddress |
( |
| ) |
const |
- Returns
- the address of the object as a string
◆ getAddressValue()
uint32_t minhton::PhysicalNodeInfo::getAddressValue |
( |
| ) |
const |
- Returns
- a calculated unique value of the ip address as an uint32_t
◆ getPort()
uint16_t minhton::PhysicalNodeInfo::getPort |
( |
| ) |
const |
- Returns
- the port of the object
◆ getString()
std::string minhton::PhysicalNodeInfo::getString |
( |
| ) |
const |
- Returns
- a simple string representation of the object
◆ isInitialized()
bool minhton::PhysicalNodeInfo::isInitialized |
( |
| ) |
const |
Returns the current state of the PhysicalNodeInfo if the node is properly initialized.
Typical usage:
bool isInitialized() const
Definition physical_node_info.cpp:73
- Returns
- true if the node has a proper PhysicalNodeInfo, otherwise false
We are initialized, if our address and port are valid.
◆ setAddress()
void minhton::PhysicalNodeInfo::setAddress |
( |
std::string |
address | ) |
|
Sets the address of the object
- Parameters
-
address | valid IPv4address string |
◆ setPort()
void minhton::PhysicalNodeInfo::setPort |
( |
uint16_t |
port | ) |
|
Sets the port of the object, which needs to be in range of k_RANDOM_PORT_MINIMUM..k_RANDOM_PORT_MAXIMUM
- Parameters
-
◆ operator!=
- Returns
- true if n1 and n2 are not equal
◆ operator<
- Returns
- true if the calculated unique value of n1 is smaller than that of n2
◆ operator<=
- Returns
- true if the calculated unique value of n1 is smaller or equal than that of n2
◆ operator==
- Returns
- true if the address and port are the same
◆ operator>
- Returns
- true if the calculated unique value of n1 is larger than that of n2
◆ operator>=
- Returns
- true if the calculated unique value of n1 is larger or equal than that of n2
The documentation for this class was generated from the following files: