tuweni / org.apache.tuweni.scuttlebutt.lib / ScuttlebuttClientFactory / fromNet

fromNet

static fun fromNet(host: String!, port: Int, keyPair: KeyPair!, serverPublicKey: PublicKey!): AsyncResult<ScuttlebuttClient!>! (source)

Creates a scuttlebutt client by connecting with the given host, port and keypair

Parameters

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

serverPublicKey - PublicKey!: the public key of the server we connect to

Return
AsyncResult<ScuttlebuttClient!>!: the scuttlebutt client