tuweni / org.apache.tuweni.scuttlebutt.lib / NetworkService / createChangesStream

createChangesStream

open fun createChangesStream(streamHandler: Function<Runnable!, StreamHandler<PeerStateChange!>!>!): Unit (source)

Opens a stream of peer connection state changes.

Parameters

streamHandler - Function<Runnable!, StreamHandler<PeerStateChange!>!>!: A function that can be invoked to instantiate a stream handler to pass events to, with a given runnable to close the stream early

Exceptions

JsonProcessingException - If the stream could be opened due to an error serializing the request

ConnectionClosedException - if the stream could not be opened due to the connection being closed