#include <peer.h>
|
| 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.
|
| |
| std::optional< PeerInfo > | info () const |
| | Look up the peer's metadata in the directory (nullopt if gone).
|
| |
Definition at line 28 of file peer.h.
◆ disconnect()
| void librats::Peer::disconnect |
( |
| ) |
const |
Request this peer be disconnected.
◆ id()
| const PeerId & librats::Peer::id |
( |
| ) |
const |
|
inlinenoexcept |
◆ info()
| std::optional< PeerInfo > librats::Peer::info |
( |
| ) |
const |
Look up the peer's metadata in the directory (nullopt if gone).
◆ send()
| bool librats::Peer::send |
( |
std::string_view |
channel, |
|
|
ByteView |
payload |
|
) |
| const |
Send bytes on a named application channel, to this peer over whichever connection currently serves it.
- Returns
- whether that peer's queue still has room — the same answer, and the same contract, as Node::send(): false means stop and wait for on_peer_writable rather than keep going. A handler that replies through this handle is the most ordinary way to write to a peer, so it has to be able to feel backpressure like any other sender; while this returned void it could not, and the bytes it queued were invisible to peer_writable() into the bargain.
◆ Node
The documentation for this class was generated from the following file: