ligo/src/lib_p2p/p2p_welcome.mli

27 lines
1.1 KiB
OCaml
Raw Normal View History

(**************************************************************************)
(* *)
2018-02-06 00:17:03 +04:00
(* Copyright (c) 2014 - 2018. *)
(* Dynamic Ledger Solutions, Inc. <contact@tezos.com> *)
(* *)
(* All rights reserved. No warranty, explicit or implicit, provided. *)
(* *)
(**************************************************************************)
2018-02-20 21:28:05 +04:00
(** Welcome worker.
Accept incoming connections and add them to the pool.
*)
type t
2018-02-20 21:28:05 +04:00
(** Type of a welcome worker. *)
val run:
2018-02-20 21:28:05 +04:00
?addr:P2p_addr.t -> backlog:int ->
('msg, 'meta, 'meta_conn) P2p_pool.t -> P2p_addr.port -> t Lwt.t
2018-02-20 21:28:05 +04:00
(** [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
2018-02-20 21:28:05 +04:00
(** [shutdown t] returns when [t] has completed shutdown. *)