scuttlebutt-client-lib / org.apache.tuweni.scuttlebutt.lib / ScuttlebuttClientFactory / fromNetWithVertx

fromNetWithVertx

static fun fromNetWithVertx(mapper: ObjectMapper!, vertx: Vertx!, host: String!, port: Int, keyPair: KeyPair!): AsyncResult<ScuttlebuttClient!>! (source)

Creates a scuttllebutt client by connecting with the given host, port and keypair using the given vertx instance.

Parameters

mapper - ObjectMapper!: The ObjectMapper for serializing the content of published scuttlebutt messages

vertx - Vertx!: the vertx instance to use for network IO

host - String!: The host to connect to as a scuttlebutt client

port - Int: The port to connect on

keyPair - KeyPair!: The keys to use for the secret handshake

Return
AsyncResult<ScuttlebuttClient!>!: the scuttlebutt client