readNext

suspend fun readNext(): T

Suspends and waits for the next piece of data.

Return

the next available piece of data.

Throws

when the stream is closed and no more data is available.