tezos-p2p

Tezos: library for a pool of P2P connections
Library tezos-p2p
type ('conn, 'conn_meta) t =
| Accepted of {
current_point : Tezos_base.TzPervasives.P2p_connection.Id.t;
cancel : Lwt_canceler.t;
}
(*

We accepted a incoming connection, we greeted back and we are waiting for an acknowledgment.

*)
| Running of {
data : 'conn;
conn_metadata : 'conn_meta;
current_point : Tezos_base.TzPervasives.P2p_connection.Id.t;
}
(*

Successfully authenticated connection, normal business.

*)
| Disconnected(*

No connection established currently.

*)
type ('conn, 'conn_meta) state = ( 'conn, 'conn_meta ) t
val pp : Format.formatter -> ( 'conn, 'conn_meta ) t -> unit
module Info : sig ... end
val get : ( 'conn, 'peer_meta, 'conn_meta ) Info.t -> ( 'conn, 'conn_meta ) state
val is_disconnected : ( 'conn, 'peer_meta, 'conn_meta ) Info.t -> bool
val is_accepted : ( 'conn, 'peer_meta, 'conn_meta ) Info.t -> bool
val is_running : ( 'conn, 'peer_meta, 'conn_meta ) Info.t -> bool
val set_accepted : timestamp:Tezos_base.TzPervasives.Time.System.t -> ( 'conn, 'peer_meta, 'conn_meta ) Info.t -> Tezos_base.TzPervasives.P2p_connection.Id.t -> Lwt_canceler.t -> unit
val set_running : timestamp:Tezos_base.TzPervasives.Time.System.t -> ( 'conn, 'peer_meta, 'conn_meta ) Info.t -> Tezos_base.TzPervasives.P2p_connection.Id.t -> 'conn -> 'conn_meta -> unit
val set_disconnected : timestamp:Tezos_base.TzPervasives.Time.System.t -> ?requested:bool -> ( 'conn, 'peer_meta, 'conn_meta ) Info.t -> unit