The read side, published in the node's ServiceRegistry so a NAT-traversal module can consult it without holding the Node: More...
#include <nat_status.h>
Public Member Functions | |
| virtual | ~ExternalAddressService ()=default |
| virtual std::vector< Address > | external_udp_endpoints () const =0 |
| Endpoints peers have reported observing our shared datagram socket at, most recently confirmed first. | |
| virtual NatMapping | udp_mapping () const =0 |
| What the observations so far say about the mapping. | |
The read side, published in the node's ServiceRegistry so a NAT-traversal module can consult it without holding the Node:
if (auto* nat = ctx.services.get<ExternalAddressService>())
if (nat->udp_mapping() == NatMapping::EndpointDependent) return; // don't bother
Definition at line 64 of file nat_status.h.
|
virtualdefault |
|
pure virtual |
Endpoints peers have reported observing our shared datagram socket at, most recently confirmed first.
Empty until at least one peer has said so over a datagram link. These are what a hole punch advertises to its target.
Implemented in librats::NatStatus.
|
pure virtual |
What the observations so far say about the mapping.
Implemented in librats::NatStatus.