Back to Site
Loading...
Searching...
No Matches
relay_service.h
Go to the documentation of this file.
1#pragma once
2
25
26#include "librats/util/rats_export.h"
28
29namespace librats {
30
31struct RATS_API RelayService {
32 virtual ~RelayService() = default;
33
43 virtual bool connect_via_relay(const PeerId& target) = 0;
44
47 virtual bool serves(const PeerId& /*peer*/) const { return false; }
48};
49
50} // namespace librats
Definition node.h:75
Self-certifying peer identity.
virtual ~RelayService()=default
virtual bool connect_via_relay(const PeerId &target)=0
Try to reach target through a node both ends are connected to.
virtual bool serves(const PeerId &) const
Whether peer said it carries circuits for others — a node to try first for anything relayed,...