tuweni / org.apache.tuweni.rlpx / RLPxService

RLPxService

interface RLPxService (source)

Service allowing connections to remote peers over RLPx connections.

Functions

actualPort

Provides the actual port in use.

abstract fun actualPort(): Int

actualSocketAddress

Provides the actual socket address (network interface and port) in use.

abstract fun actualSocketAddress(): InetSocketAddress!

addToKeepAliveList

Adds a peer public key to the list of peers to keep alive.

abstract fun addToKeepAliveList(peerPublicKey: PublicKey!): Boolean

advertisedPort

Provides the advertised port.

abstract fun advertisedPort(): Int

connectTo

Connects to a remote peer.

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

disconnect

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

abstract fun disconnect(connection: WireConnection!, 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, connection: WireConnection!, 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