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.
<init> |
Default constructor. ScuttlebuttLocalDiscoveryService(vertx: Vertx!, listenPort: Int, listenNetworkInterface: String!, multicastAddress: String!) |
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! |