15#include "librats/util/rats_export.h"
19#include "librats/peer/peer_table.h"
30 const PeerId&
id() const noexcept {
return id_; }
48 std::optional<PeerInfo>
info()
const;
53 : id_(
std::move(id)), route_(route), node_(&node) {}
Lightweight byte container aliases and a non-owning byte view.
Non-owning view over a contiguous run of bytes.
std::optional< PeerInfo > info() const
Look up the peer's metadata in the directory (nullopt if gone).
const PeerId & id() const noexcept
bool send(std::string_view channel, ByteView payload) const
Send bytes on a named application channel, to this peer over whichever connection currently serves it...
void disconnect() const
Request this peer be disconnected.
Self-certifying peer identity.
Addressing/metadata for a peer — the shareable, persistable identity.