BaseStreamReceiver

abstract class BaseStreamReceiver<T>(source: Channel<ByteArray>)

Inheritors

Constructors

Link copied to clipboard
constructor(source: Channel<ByteArray>)

Properties

Link copied to clipboard
abstract val flow: Flow<T>

Functions

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

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

Link copied to clipboard
suspend fun readNext(): T

Suspends and waits for the next piece of data.