Mavryk_p2p.P2p_point_state
type 'conn t =
| Requested of {
}
We initiated a connection.
*)| Accepted of {
current_peer_id : Mavryk_base.TzPervasives.P2p_peer.Id.t;
cancel : Lwt_canceler.t;
}
We accepted a incoming connection.
*)| Running of {
data : 'conn;
current_peer_id : Mavryk_base.TzPervasives.P2p_peer.Id.t;
}
Successfully authenticated connection, normal business.
*)| Disconnected
No connection established currently.
*)type 'conn state = 'conn t
val pp : Stdlib.Format.formatter -> 'conn t -> unit
module Info : sig ... end
val is_running : 'conn Info.t -> bool
val is_disconnected : 'conn Info.t -> bool
val is_accepted : 'conn Info.t -> bool
val set_requested :
timestamp:Mavryk_base.TzPervasives.Time.System.t ->
'conn Info.t ->
Lwt_canceler.t ->
unit
val set_accepted :
timestamp:Mavryk_base.TzPervasives.Time.System.t ->
'conn Info.t ->
Mavryk_base.TzPervasives.P2p_peer.Id.t ->
Lwt_canceler.t ->
unit
val set_running :
timestamp:Mavryk_base.TzPervasives.Time.System.t ->
'conn Info.t ->
Mavryk_base.TzPervasives.P2p_peer.Id.t ->
'conn ->
unit
val set_private : 'conn Info.t -> bool -> unit
val set_disconnected :
timestamp:Mavryk_base.TzPervasives.Time.System.t ->
?requested:bool ->
Mavryk_p2p_services.Point_reconnection_config.t ->
'conn Info.t ->
unit
val set_expected_peer_id :
'conn Info.t ->
Mavryk_base.TzPervasives.P2p_peer.Id.t ->
unit
set_expected_peer_id point_info peer_id
associates an expected peer_id
to point_info
.
val get_expected_peer_id :
'conn Info.t ->
Mavryk_base.TzPervasives.P2p_peer.Id.t option
val info_of_point_info :
'conn Info.t ->
Mavryk_base.TzPervasives.P2p_point.Info.t