readAvailable

abstract suspend fun readAvailable(
    dst: ByteArray,
    offset: Int,
    length: Int
): Int

Reads all available bytes to dst buffer and returns immediately or suspends if no bytes available

Return number of bytes were read or -1 if the channel has been closed

abstract suspend fun readAvailable(dst: IoBuffer): Int
abstract suspend fun readAvailable(dst: ByteBuffer): Int