Common System 0.2.0
Common interfaces and patterns for system integration
Loading...
Searching...
No Matches
kcenon::common::concepts::UdpConnectable Concept Reference

A type that supports UDP connection operations. More...

#include <transport.h>

Concept definition

template<typename T>
const std::string& host,
uint16_t port) {
{ t.connect(host, port) };
{ t.disconnect() } -> std::same_as<void>;
}
A type that supports UDP connection operations.
Definition transport.h:148

Detailed Description

A type that supports UDP connection operations.

Types satisfying this concept can establish a "connected" UDP socket for optimized sending to a specific endpoint.

Example usage:

template<UdpConnectable U>
void setup_metrics_client(U& client) {
client.connect("metrics.example.com", 8125);
}

Definition at line 148 of file transport.h.