DittoBusStreamCallback

interface DittoBusStreamCallback

Callbacks required to use the Ditto Bus API with explicit stream handles.

Functions

Link copied to clipboard
abstract fun dittoBusStreamDidAcknowledgeReceipt(busStream: DittoBusStream, messageSequence: BigInteger)

The remote peer has acknowledged receipt of all messages up to the given sequence number.

Link copied to clipboard
abstract fun dittoBusStreamDidClose(busStream: DittoBusStream, error: DittoError)

The stream has closed. This can be triggered by calling close() or by the remote peer doing the same.

abstract fun dittoBusStreamDidEnqueueDataWithMessageSequence(    busStream: DittoBusStream,     messageSequence: BigInteger,     error: DittoError?)

The operation to enqueue outgoing data on a stream has completed. More data may now be enqueued.

Link copied to clipboard
abstract fun dittoBusStreamDidReceiveMessage(busStream: DittoBusStream, message: ByteArray)

A new message has been received from the specified stream.