ReadSession

interface ReadSession

Deprecated: Use read { } instead.

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

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

SuspendableReadSession

interface SuspendableReadSession : ReadSession