ligo/src/lib_p2p/p2p_welcome.mli
michael 3f1363b9ba P2P/Shell: Split metadata into peer_metadata and conn_metadata
Peer_metadata is meant to keep track of peer's score.

Conn_metadata is meant to keep track of connection configuration given
during Ack exchange.
2018-05-25 11:39:22 +02:00

27 lines
1.1 KiB
OCaml

(**************************************************************************)
(* *)
(* Copyright (c) 2014 - 2018. *)
(* Dynamic Ledger Solutions, Inc. <contact@tezos.com> *)
(* *)
(* All rights reserved. No warranty, explicit or implicit, provided. *)
(* *)
(**************************************************************************)
(** Welcome worker.
Accept incoming connections and add them to the pool.
*)
type t
(** Type of a welcome worker. *)
val run:
?addr:P2p_addr.t -> backlog:int ->
('msg, 'meta, 'meta_conn) P2p_pool.t -> P2p_addr.port -> t Lwt.t
(** [run ?addr ~backlog pool port] returns a running welcome worker
adding connections into [pool] listening on [addr:port]. [backlog]
is passed to [Lwt_unix.listen]. *)
val shutdown: t -> unit Lwt.t
(** [shutdown t] returns when [t] has completed shutdown. *)