Back to Site
Loading...
Searching...
No Matches
librats::Peer Class Reference

#include <peer.h>

Public Member Functions

const PeerIdid () 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.
 
std::optional< PeerInfoinfo () const
 Look up the peer's metadata in the directory (nullopt if gone).
 

Friends

class Node
 

Detailed Description

Definition at line 25 of file peer.h.

Member Function Documentation

◆ disconnect()

void librats::Peer::disconnect ( ) const

Request this peer be disconnected.

◆ id()

const PeerId & librats::Peer::id ( ) const
inlinenoexcept

Definition at line 27 of file peer.h.

◆ info()

std::optional< PeerInfo > librats::Peer::info ( ) const

Look up the peer's metadata in the directory (nullopt if gone).

◆ send()

void librats::Peer::send ( std::string_view  channel,
ByteView  payload 
) const

Send bytes on a named application channel.

Friends And Related Symbol Documentation

◆ Node

friend class Node
friend

Definition at line 39 of file peer.h.


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