[][src]Module holochain_net::p2p_network

This module defines the trait for holochain networking / p2p The goal is to make implementing concrete strucs as simple as possible so that we can iterate quickly on the API. All calls will go through one of two api functions, one using json strings, and the other using binary buffers.

Enums

P2pNetworkState

enum defining the state of this p2p/network connection

Constants

BIN_TYPE_APP_ENCRYPTION

binary api function set_app_encryption_callback uses this leading byte

BIN_TYPE_APP_SIGNATURE

binary api function set_app_signature_callback uses this leading byte

BIN_TYPE_TRACK_APP

binary api function track_app uses this leading byte

BIN_TYPE_UNTRACK_APP

binary api function untrack_app uses this leading byte

Traits

P2pNetwork

Represents a connection to a peer to peer network module On initial instantiation, only calling get_state is valid see P2pNetorkState for usage

Type Definitions

ApiFnBin

callback function type for api methods transporting binary data

ApiFnJson

callback function type for api methods transporting json data

DhtHoldCallback

when the network is requesting we store data this callback will be invoked, expecting the data to be validated

GenomeHash

the identifier for an application