Crate ant_protocol

Source

Re-exports§

pub use error::Error;
pub use error::Error as NetworkError;

Modules§

error
Errors.
messages
Messages types Data messages and their possible responses.
node
Helpers for antnode
node_rpc
RPC commands to node
storage
Storage types for GraphEntry and Chunk
version
Network versioning

Structs§

Bytes
Re-export of Bytes used throughout the protocol A cheaply cloneable and sliceable chunk of contiguous memory.
PrettyPrintKBucketKey
Pretty print a kad::KBucketKey as a hex string.
PrettyPrintRecordKey
Provides a hex representation of a kad::RecordKey.

Enums§

NetworkAddress
This is the address in the network by which proximity/distance to other items (whether nodes or data chunks) are calculated.

Constants§

CLOSE_GROUP_SIZE
The maximum number of peers to return in a GetClosestPeers response. This is the group size used in safe network protocol to be responsible for an item in the network. The peer should be present among the CLOSE_GROUP_SIZE if we’re fetching the close_group(peer) The size has been set to 5 for improved performance.

Functions§

get_port_from_multiaddr
Returns the UDP port from the provided MultiAddr.