readSuspendableSession

open suspend fun readSuspendableSession(
    consumer: suspend SuspendableReadSession.() -> Unit
): Unit

Overrides ByteReadChannel.readSuspendableSession

Deprecated: Use read instead.

Starts a suspendable read session. After channel preparation consumer lambda will be invoked immediately even if there are no bytes available for read yet. consumer lambda could suspend as much as needed.