2017-01-14 16:14:07 +04:00
|
|
|
(**************************************************************************)
|
|
|
|
(* *)
|
2017-11-14 03:36:14 +04:00
|
|
|
(* Copyright (c) 2014 - 2017. *)
|
2017-01-14 16:14:07 +04:00
|
|
|
(* 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 its
|
|
|
|
connection pool. *)
|
|
|
|
|
|
|
|
type t
|
|
|
|
(** Type of a welcome worker, parametrized like a
|
|
|
|
[P2p_connection_pool.pool]. *)
|
|
|
|
|
|
|
|
val run:
|
|
|
|
backlog:int ->
|
2018-01-24 15:48:25 +04:00
|
|
|
('msg, 'meta) P2p_pool.t ->
|
|
|
|
?addr:P2p_addr.t -> P2p_addr.port -> t Lwt.t
|
2017-01-14 16:14:07 +04:00
|
|
|
(** [run ~backlog ~addr pool port] returns a running welcome worker
|
|
|
|
feeding [pool] listening at [(addr, port)]. [backlog] is the
|
|
|
|
argument passed to [Lwt_unix.accept]. *)
|
|
|
|
|
|
|
|
val shutdown: t -> unit Lwt.t
|