rlpx / org.apache.tuweni.rlpx / RLPxService

RLPxService

interface RLPxService (source)

Service allowing connections to remote peers over RLPx connections.

Functions

broadcast

abstract fun broadcast(subProtocolIdentifier: SubProtocolIdentifier, messageType: Int, message: Bytes): Unit

Sends a wire message to all connected peers.

connectTo

abstract fun connectTo(peerPublicKey: PublicKey, peerAddress: InetSocketAddress): AsyncCompletion

Connects to a remote peer

disconnect

abstract fun disconnect(connectionId: String, reason: DisconnectReason): Unit

Sends a message to the peer explaining that we are about to disconnect.

repository

abstract fun repository(): WireConnectionRepository

Gets the wire connections repository associated with this service.

send

abstract fun send(subProtocolIdentifier: SubProtocolIdentifier, messageType: Int, connectionId: String, message: Bytes): Unit

Sends a wire message to a peer.

start

abstract fun start(): AsyncCompletion

Starts the service.

stop

abstract fun stop(): AsyncCompletion

Stops the service.

Inheritors

VertxRLPxService

class VertxRLPxService : RLPxService

Implementation of RLPx service using Vert.x.