#include <relay.h>
Definition at line 93 of file relay.h.
◆ Relay() [1/2]
| librats::Relay::Relay |
( |
| ) |
|
◆ Relay() [2/2]
| librats::Relay::Relay |
( |
Config |
config | ) |
|
|
explicit |
◆ ~Relay()
| librats::Relay::~Relay |
( |
| ) |
|
|
override |
◆ attach()
◆ attempts()
| size_t librats::Relay::attempts |
( |
| ) |
const |
Attempts to reach a peer through a relay that are currently running.
◆ carried_bytes()
| uint64_t librats::Relay::carried_bytes |
( |
| ) |
const |
Bytes forwarded on behalf of other peers.
◆ carried_circuits()
| size_t librats::Relay::carried_circuits |
( |
| ) |
const |
Circuits this node is carrying on behalf of other peers.
◆ circuits()
| size_t librats::Relay::circuits |
( |
| ) |
const |
Circuits this node terminates (relayed peers, live or still being set up).
◆ connect_via_relay()
| bool librats::Relay::connect_via_relay |
( |
const PeerId & |
target | ) |
|
|
overridevirtual |
Try to reach target through a node both ends are connected to.
Non-blocking; success surfaces as an ordinary peer-connected event, and the resulting peer is ordinary in every way except that its bytes take a detour (PeerInfo::transport is TransportKind::Relay).
- Returns
- whether an attempt actually started — false is routine (already connected, an attempt is already running, the target is in cooldown, or this node has no peer that could carry the circuit) and needs no handling by the caller.
Implements librats::RelayService.
◆ start()
| void librats::Relay::start |
( |
| ) |
|
|
overridevirtual |
◆ stop()
| void librats::Relay::stop |
( |
| ) |
|
|
overridevirtual |
The documentation for this class was generated from the following file: