package octez-shell-libs

  1. Overview
  2. Docs
Octez shell libraries

Install

Dune Dependency

Authors

Maintainers

Sources

octez-19.0.tar.gz
sha256=c6df840ebbf115e454db949028c595bec558a59a66cade73b52a6d099d6fa4d4
sha512=d8aee903b9fe130d73176bc8ec38b78c9ff65317da3cb4f3415f09af0c625b4384e7498201fdb61aa39086a7d5d409d0ab3423f9bc3ab989a680cf444a79bc13

doc/octez-shell-libs.p2p/Tezos_p2p/P2p_discovery/index.html

Module Tezos_p2p.P2p_discoverySource

Local peer discovery.

This module manages the discovery of local peers through UDP broadcasting. It is composed of two workers:

  • The sender worker whose role is to broadcast discovery messages.
  • The answer worker whose role is to listen discovery messages and register new peers in the current pool. Discovery messages are composed of an arbitrary key, the listening port and the peer id of the current peer.
Sourcetype t

Type of a discovery worker.

Sourceval create : listening_port:int -> discovery_port:int -> discovery_addr:Ipaddr.V4.t -> trust_discovered_peers:bool -> ('a, 'b, 'c) P2p_pool.t -> Tezos_base.TzPervasives.P2p_peer.Table.key -> t

create ~listening_port ~discovery_port ~discovery_addr pool peer_id returns a discovery worker registering local peers to the pool and broadcasting discovery messages with the peer_id and the listening_port through the address discovery_addr:discovery_port.

Sourceval activate : t -> unit
Sourceval wakeup : t -> unit

wakeup t sends a signal to the sender machine of t, asking it to immediately proceed to broadcasting.

Sourceval shutdown : t -> unit Lwt.t

shutdown t returns when t has completed shutdown.

OCaml

Innovation. Community. Security.