DittoBusStream

A message-based communication channel to another peer in the mesh.

When a DittoBusStream is received by any means, you must immediately set callbacks. This provides the notifications of incoming messages and other events.

Outgoing messages can be enqueued using enqueueMessage(). You must wait for the callback method indicating that the enqueue was successful before calling this method again. This process provides backpressure so that your app does not send data more quickly than the network can deliver.

Properties

Link copied to clipboard

Callbacks for events relating to this stream.

Link copied to clipboard

The reliability mode under which this stream is operating.

Link copied to clipboard

An ID unique to the local device that can be used to track this individual stream.

Functions

Link copied to clipboard
fun close()

Close this stream in both directions.

Link copied to clipboard
Link copied to clipboard

true if enqueueMessage may be called at this time and false if there is a send pending.