[][src]Crate tari_comms

Tari Comms

The Tari network messaging library.

See CommsBuilder for more information on using this library.

Modules

backoff
bounded_executor
compat

This module provides a compatibility shim between traits in the futures and tokio crate.

connection_manager
connectivity
framing
memsocket
message

Message

multiaddr
net_address
peer_manager

The peer list maintained by the Peer Manager are used when constructing outbound messages. Peers can be added and removed from the list and can be found via their NodeId, Public key or Net Address. A subset of peers can be requested from the Peer Manager based on a specific Broadcast Strategy.

pipeline

Comms Pipeline

protocol
rate_limit

Rate limited flow control implementation that allows a certain number of items to be obtained from the stream within a given time interval. The underlying stream will begin to buffer and produce backpressure if producers exceed the capacity and restock_intervals.

socks
test_utils
tor

Tor Hidden Services and Control Port Client

transports
types
utils

Macros

log_if_error

Log an error if an Err is returned from the $expr. If the given expression is Ok(v), Some(v) is returned, otherwise None is returned (same as Result::ok). Useful in cases where the error should be logged and ignored. instead of writing if let Err(err) = my_error_call() { error!(...) }, you can write log_if_error!(my_error_call())

log_if_error_fmt
outdir_include
wrap_in_envelope_body

Wraps a number of prost::Messages in a EnvelopeBody

Structs

Bytes

A reference counted contiguous slice of memory.

BytesMut

A unique reference to a contiguous slice of memory.

CommsBuilder

The CommsBuilder provides a simple builder API for getting Tari comms p2p messaging up and running.

CommsNode

CommsNode is a handle to a comms node.

NodeIdentity

The public and private identity of this node on the network

PeerConnection

Request handle for an active peer connection

PeerManager

The PeerManager consist of a routing table of previously discovered peers. It also provides functionality to add, find and delete peers.

Substream
UnspawnedCommsNode

Contains the built comms services

Enums

CommsBuilderError
ConnectionManagerEvent
PeerConnectionError

Functions

validate_peer_addresses