tuweni / org.apache.tuweni.plumtree.vertx / VertxGossipServer

VertxGossipServer

class VertxGossipServer (source)

Vert.x implementation of the plumtree gossip. This implementation is provided as an example and relies on a simplistic JSON serialization of messages.

Constructors

<init>

VertxGossipServer(vertx: Vertx, networkInterface: String, port: Int, messageHashing: MessageHashing, peerRepository: PeerRepository, payloadListener: MessageListener, payloadValidator: MessageValidator?, peerPruningFunction: PeerPruning?, graftDelay: Int, lazyQueueInterval: Int)

Functions

connectTo

fun connectTo(host: String, port: Int): AsyncCompletion

gossip

fun gossip(attributes: String, message: Bytes): Unit

Gossip a message to all known peers.

start

fun start(): AsyncCompletion

stop

fun stop(): AsyncCompletion