tezos-p2p

Tezos: library for a pool of P2P connections
Library tezos-p2p
type listening_socket_open_failure = {
reason : Unix.error;(*

The error we are re-raising

*)
address : Tezos_base.TzPervasives.P2p_addr.t;(*

The interface we are trying to listen to

*)
port : int;(*

The port we are trying to listen to

*)
}

Type discribing an opening failure for the listening socket.

type Tezos_base.TzPervasives.error +=
| Failed_to_open_listening_socket of listening_socket_open_failure

Type of an error in case where the listening socket fails to open.

type t

Type of a welcome worker.

create ?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 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.