A dialable transport address (ip + port). More...
#include <cstdint>#include <functional>#include <optional>#include <string>#include <string_view>Go to the source code of this file.
Classes | |
| struct | librats::Address |
Namespaces | |
| namespace | librats |
| namespace | std |
| STL namespace. | |
A dialable transport address (ip + port).
The single ip+port endpoint type used throughout the library — by the node layer (dialing, peer info, reconnection) and by the lower-level engines (DHT, BitTorrent trackers, STUN/TURN). It lives in core/ because it is a foundational transport primitive that every layer above depends on.
ip holds a bare IP literal or hostname (no brackets). IPv4/hostname endpoints serialise as host:port; IPv6 endpoints serialise in bracketed [ip]:port form so the colons in the address are never confused with the port separator. parse() accepts both forms and is the exact inverse of to_string().
Definition in file address.h.