Back to Site
Loading...
Searching...
No Matches
librats::RelayService Struct Referenceabstract

#include <relay_service.h>

Inheritance diagram for librats::RelayService:
[legend]

Public Member Functions

virtual ~RelayService ()=default
 
virtual bool connect_via_relay (const PeerId &target)=0
 Try to reach target through a node both ends are connected to.
 

Detailed Description

Definition at line 31 of file relay_service.h.

Constructor & Destructor Documentation

◆ ~RelayService()

virtual librats::RelayService::~RelayService ( )
virtualdefault

Member Function Documentation

◆ connect_via_relay()

virtual bool librats::RelayService::connect_via_relay ( const PeerId target)
pure virtual

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.

Implemented in librats::Relay.


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