tuweni / org.apache.tuweni.scuttlebutt.discovery / ScuttlebuttLocalDiscoveryService

ScuttlebuttLocalDiscoveryService

open class ScuttlebuttLocalDiscoveryService (source)

Scuttlebutt local discovery service, based on the Scuttlebutt network protocol defined here. This service offers two functions:

It broadcasts to the local network every minute Scuttlebutt identities, as individual packets.

It listens to broadcasted packets on the local network and relays Scuttlebutt identities identified to listeners.

Constructors

<init>

Default constructor.

ScuttlebuttLocalDiscoveryService(vertx: Vertx!, listenPort: Int, listenNetworkInterface: String!, multicastAddress: String!)

Functions

addIdentityToBroadcastList

Adds an identity to the ones to be broadcast by the service. Identities may be added at any time during the lifecycle of the service

open fun addIdentityToBroadcastList(identity: LocalIdentity!): Unit

addListener

Adds a listener to be notified when the service receives UDP packets that match Scuttlebutt identities. Listeners may be added at any time during the lifecycle of the service

open fun addListener(listener: Consumer<LocalIdentity!>!): Unit

start

Starts the service.

open fun start(): AsyncCompletion!

stop

Stops the service.

open fun stop(): AsyncCompletion!