ByteStreamReceiver

Receiver for an incoming byte stream.

Provided to ByteStreamHandler callbacks registered through Room.

See also

Room.registerByteStreamHandler

Constructors

Link copied to clipboard
constructor(info: ByteStreamInfo, channel: Channel<ByteArray>)

Properties

Link copied to clipboard
open override val flow: Flow<ByteArray>

A Flow of stream data as it arrives.

Link copied to clipboard

Metadata for this stream.

Functions

Link copied to clipboard
suspend fun readAll(): List<ByteArray>

Suspends and waits for all available data until the stream is closed.

Link copied to clipboard
suspend fun readNext(): ByteArray

Suspends and waits for the next piece of data.