Mavryk_p2p.P2p_peer_state
type ('conn, 'conn_meta) t =
| Accepted of {
current_point : Mavryk_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 : Mavryk_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 : Stdlib.Format.formatter -> ('conn, 'conn_meta) t -> unit
module Info : sig ... end
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:Mavryk_base.TzPervasives.Time.System.t ->
('conn, 'peer_meta, 'conn_meta) Info.t ->
Mavryk_base.TzPervasives.P2p_connection.Id.t ->
Lwt_canceler.t ->
unit
val set_running :
timestamp:Mavryk_base.TzPervasives.Time.System.t ->
('conn, 'peer_meta, 'conn_meta) Info.t ->
Mavryk_base.TzPervasives.P2p_connection.Id.t ->
'conn ->
'conn_meta ->
unit
val set_disconnected :
timestamp:Mavryk_base.TzPervasives.Time.System.t ->
?requested:bool ->
('conn, 'peer_meta, 'conn_meta) Info.t ->
unit