tuweni / org.apache.tuweni.scuttlebutt.rpc.mux / Multiplexer

Multiplexer

interface Multiplexer (source)

Multiplexes asynchronous requests and streams across a connection to a node. Handles multiple active requests and streams across one connection.

Functions

close

Close the underlying connection

abstract fun close(): Unit

makeAsyncRequest

Issue an 'async' type request to a node, which will eventually return a result from the node.

abstract fun makeAsyncRequest(request: RPCAsyncRequest!): AsyncResult<RPCResponse!>!

openStream

Creates a request which opens a stream (e.g. a 'source' in the protocol docs.)

abstract fun openStream(request: RPCStreamRequest!, streamFactory: Function<Runnable!, ScuttlebuttStreamHandler!>!): Unit

Inheritors

RPCHandler

Handles RPC requests and responses from an active connection to a scuttlebutt node.

open class RPCHandler : Multiplexer, ClientHandler