package octez-shell-libs

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Welcome worker.

Accept incoming connections and add them to the pool.

type t

Type of a welcome worker.

val create : ?reuse_port:bool -> ?addr:Tezos_base.TzPervasives.P2p_addr.t -> backlog:int -> ('msg, 'meta, 'meta_conn) P2p_connect_handler.t -> Tezos_base.TzPervasives.P2p_addr.port -> t Tezos_base.TzPervasives.tzresult Lwt.t

create ?reuse_port ?addr ~backlog pool port returns a running welcome worker adding connections into pool listening on addr:port. backlog is passed to Lwt_unix.listen.

reuse_port should be used for testing purposes. This option sets SO_REUSEPORT on the socket, allowing to reuse a port opened elsewhere.

val activate : t -> unit

activate t start the worker that will accept connections

val shutdown : t -> unit Lwt.t

shutdown t returns when t has completed shutdown.

OCaml

Innovation. Community. Security.