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

openStream

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

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

Parameters

request - RPCStreamRequest!: the request details

streamFactory - Function<Runnable!, ScuttlebuttStreamHandler!>!: a function which takes a 'Runnable' which closes the stream when ran, and returns a stream handler to pass messages to

Exceptions

JsonProcessingException - if JSON marshalling fails.