package tezos-p2p

  1. Overview
  2. Docs
type ('conn, 'conn_meta) t =
  1. | Accepted of {
    1. current_point : Tezos_base.TzPervasives.P2p_connection.Id.t;
    2. cancel : Lwt_canceler.t;
    }
    (*

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

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

    Successfully authenticated connection, normal business.

    *)
  3. | 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