rlpx / org.apache.tuweni.rlpx / RLPxService

RLPxService

interface RLPxService (source)

Service allowing connections to remote peers over RLPx connections.

Functions

broadcast

Sends a wire message to all connected peers.

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

connectTo

Connects to a remote peer

abstract fun connectTo(peerPublicKey: PublicKey!, peerAddress: InetSocketAddress!): AsyncResult<String!>!

disconnect

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

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

getClient

Gets a subprotocol client associated with the given subprotocol.

abstract fun getClient(subProtocolIdentifier: SubProtocolIdentifier!): SubProtocolClient!

repository

Gets the wire connections repository associated with this service.

abstract fun repository(): WireConnectionRepository!

send

Sends a wire message to a peer.

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

start

Starts the service.

abstract fun start(): AsyncCompletion!

stop

Stops the service.

abstract fun stop(): AsyncCompletion!

Inheritors

VertxRLPxService

Implementation of RLPx service using Vert.x.

class VertxRLPxService : RLPxService