Back to Site
Loading...
Searching...
No Matches
librats::ExternalAddressService Class Referenceabstract

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>

Inheritance diagram for librats::ExternalAddressService:
[legend]

Public Member Functions

virtual ~ExternalAddressService ()=default
 
virtual std::vector< Addressexternal_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.
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ ~ExternalAddressService()

virtual librats::ExternalAddressService::~ExternalAddressService ( )
virtualdefault

Member Function Documentation

◆ external_udp_endpoints()

virtual std::vector< Address > librats::ExternalAddressService::external_udp_endpoints ( ) const
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.

◆ udp_mapping()

virtual NatMapping librats::ExternalAddressService::udp_mapping ( ) const
pure virtual

What the observations so far say about the mapping.

Implemented in librats::NatStatus.


The documentation for this class was generated from the following file: