tezos-p2p

Tezos: library for a pool of P2P connections
Library tezos-p2p
type 'msg conn_info = {
peer_id : Tezos_base.TzPervasives.P2p_peer.Id.t;
is_private : bool;
write_advertise : Tezos_base.TzPervasives.P2p_point.Id.t list -> bool Tezos_base.TzPervasives.tzresult;(*

write_advertise points must send the message Advertise(points) to the internal peer_id. It must return Ok true if the message has been successfully sent, Ok false if the message has been dropped, or fails with a corresponding error otherwise.

*)
write_swap_ack : Tezos_base.TzPervasives.P2p_point.Id.t -> Tezos_base.TzPervasives.P2p_peer.Id.t -> bool Tezos_base.TzPervasives.tzresult;(*

write_swap_ack (p1, p2) must send the message Swap_ack(p1, p2) to the internal peer_id. It must return Ok true if the message has been successfully sent, Ok false if the message has been dropped, or fails with a corresponding error otherwise.

*)
messages : (int * 'msg) Tezos_stdlib.Lwt_pipe.Maybe_bounded.t;
}
type request_info = {
last_sent_swap_request : (Tezos_base.TzPervasives.Time.System.t * Tezos_base.TzPervasives.P2p_peer.Id.t) option;
}
type 'msg t = 'msg conn_info -> 'msg callback