SuspendableReadSession

interface SuspendableReadSession : ReadSession

Deprecated: Use read { } instead.

Inherited Properties

availableForRead

abstract val availableForRead: Int

Number of bytes available for read. However it doesn’t necessarily means that all available bytes could be requested at once

Functions

await

abstract suspend fun await(atLeast: Int = 1): Boolean

Suspend until atLeast bytes become available or end of stream encountered (possibly due to exceptional close)

Inherited Functions

discard

abstract fun discard(n: Int): Int

Discard at most n available bytes or 0 if no bytes available yet

request

abstract fun request(atLeast: Int = 1): IoBuffer?

Request buffer range atLeast bytes length

Inheritors

ByteChannelSequentialBase

abstract class ByteChannelSequentialBase : 
    ByteChannel,
    ByteReadChannel,
    ByteWriteChannel,
    SuspendableReadSession,
    HasReadSession,
    HasWriteSession

Sequential (non-concurrent) byte channel implementation