interface SuspendableReadSession : ReadSession
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 |
abstract suspend fun await(atLeast: Int = 1): Boolean
Suspend until atLeast bytes become available or end of stream encountered (possibly due to exceptional close) |
abstract fun discard(n: Int): Int
Discard at most n available bytes or 0 if no bytes available yet |
|
abstract fun request(atLeast: Int = 1): IoBuffer?
Request buffer range atLeast bytes length |
abstract class ByteChannelSequentialBase : ByteChannel, ByteReadChannel, ByteWriteChannel, SuspendableReadSession, HasReadSession, HasWriteSession
Sequential (non-concurrent) byte channel implementation |