13#include "core/bytes.h"
16#include "peer/peer_table.h"
27 const PeerId&
id() const noexcept {
return id_; }
30 void send(std::string_view channel, ByteView payload)
const;
36 std::optional<PeerInfo>
info()
const;
41 : id_(
std::move(
id)), route_(route), node_(&node) {}
std::optional< PeerInfo > info() const
Look up the peer's metadata in the directory (nullopt if gone).
const PeerId & id() const noexcept
void send(std::string_view channel, ByteView payload) const
Send bytes on a named application channel.
void disconnect() const
Request this peer be disconnected.
Self-certifying peer identity.
Addressing/metadata for a peer — the shareable, persistable identity.