tezos-p2p

Tezos: library for a pool of P2P connections
Library tezos-p2p
type 'peer_meta peer_meta_config = {
peer_meta_encoding : 'peer_meta Tezos_base.TzPervasives.Data_encoding.t;
peer_meta_initial : unit -> 'peer_meta;(*

Constructor

*)
score : 'peer_meta -> float;(*

Score of a peer, used for ordering

*)
}

Metadata for a peer

type 'conn_meta conn_meta_config = {
conn_meta_encoding : 'conn_meta Tezos_base.TzPervasives.Data_encoding.t;
conn_meta_value : unit -> 'conn_meta;(*

Constructor

*)
private_node : 'conn_meta -> bool;(*

Returns true if peer at the other end of the connection is in private mode

*)
}

Metadata for a connection.

type 'msg app_message_encoding =
| Encoding : {
tag : int;
title : string;
encoding : 'a Tezos_base.TzPervasives.Data_encoding.t;
wrap : 'a -> 'msg;
unwrap : 'msg -> 'a option;
max_length : int option;
} -> 'msg app_message_encoding
type 'msg message_config = {
encoding : 'msg app_message_encoding list;(*

Encoding of the messages.

*)
chain_name : Tezos_base.TzPervasives.Distributed_db_version.Name.t;(*

Identifier for this P2p protocol when establishing session.

*)
distributed_db_versions : Tezos_base.TzPervasives.Distributed_db_version.t list;(*

List of versions supported by this P2p protocol.

*)
}

Application-level messages encoding, and version parameters