Represents a UDP endpoint (host and port)
More...
#include <udp_client_interface.h>
|
| std::string | host |
| | Hostname or IP address.
|
| |
| uint16_t | port = 0 |
| | Port number.
|
| |
Represents a UDP endpoint (host and port)
Definition at line 35 of file udp_client_interface.h.
◆ udp_endpoint() [1/2]
| kcenon::common::interfaces::udp_endpoint::udp_endpoint |
( |
| ) |
|
|
default |
◆ udp_endpoint() [2/2]
| kcenon::common::interfaces::udp_endpoint::udp_endpoint |
( |
std::string | host_, |
|
|
uint16_t | port_ ) |
|
inline |
Definition at line 44 of file udp_client_interface.h.
45 :
host(std::move(host_)),
port(port_) {}
uint16_t port
Port number.
std::string host
Hostname or IP address.
◆ operator!=()
| bool kcenon::common::interfaces::udp_endpoint::operator!= |
( |
const udp_endpoint & | other | ) |
const |
|
inline |
◆ operator==()
| bool kcenon::common::interfaces::udp_endpoint::operator== |
( |
const udp_endpoint & | other | ) |
const |
|
inline |
◆ to_string()
| std::string kcenon::common::interfaces::udp_endpoint::to_string |
( |
| ) |
const |
|
inlinenodiscard |
Convert to string representation.
- Returns
- String in format "host:port"
Definition at line 51 of file udp_client_interface.h.
51 {
52 return host +
":" + std::to_string(
port);
53 }
References host, and port.
◆ host
| std::string kcenon::common::interfaces::udp_endpoint::host |
◆ port
| uint16_t kcenon::common::interfaces::udp_endpoint::port = 0 |
The documentation for this struct was generated from the following file: