readAll

suspend fun readAll(): List<T>

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

Return

A list of all data received if the stream is closed normally.

Throws

when the stream is closed abnormally.