Published as HolePunchService, so a module that discovers a peer it cannot dial (PeerExchange) can hand the id over without depending on this class.
More...
#include <hole_punch.h>
Published as HolePunchService, so a module that discovers a peer it cannot dial (PeerExchange) can hand the id over without depending on this class.
Definition at line 116 of file hole_punch.h.
◆ HolePunch() [1/2]
| librats::HolePunch::HolePunch |
( |
| ) |
|
◆ HolePunch() [2/2]
| librats::HolePunch::HolePunch |
( |
Config |
config | ) |
|
|
explicit |
◆ ~HolePunch()
| librats::HolePunch::~HolePunch |
( |
| ) |
|
|
override |
◆ active_sessions()
| size_t librats::HolePunch::active_sessions |
( |
| ) |
const |
Sessions currently in flight (diagnostics and tests).
◆ attach()
◆ punch()
| bool librats::HolePunch::punch |
( |
const PeerId & |
target | ) |
|
|
overridevirtual |
Try to reach target by punching.
Non-blocking: the rendezvous runs in the background and a successful punch surfaces as an ordinary peer-connected event. A no-op when already connected to the target, when a session for it is already running, when it is still in cooldown, or when this node has nothing punchable to advertise (see nat_status.h).
- Returns
- whether a session was actually started.
Implements librats::HolePunchService.
◆ punches_started()
| uint64_t librats::HolePunch::punches_started |
( |
| ) |
const |
|
inlinenoexcept |
Punch bursts this node has fired (diagnostics and tests).
Definition at line 195 of file hole_punch.h.
◆ relayed()
| uint64_t librats::HolePunch::relayed |
( |
| ) |
const |
|
inlinenoexcept |
Messages forwarded on behalf of other peers (diagnostics and tests).
Definition at line 197 of file hole_punch.h.
◆ start()
| void librats::HolePunch::start |
( |
| ) |
|
|
overridevirtual |
◆ stop()
| void librats::HolePunch::stop |
( |
| ) |
|
|
overridevirtual |
The documentation for this class was generated from the following file: