net-coroutines / org.apache.tuweni.net.coroutines / ReadableCoroutineByteChannel

ReadableCoroutineByteChannel

interface ReadableCoroutineByteChannel (source)

A co-routine channel that can read bytes.

Functions

read

abstract suspend fun read(dst: ByteBuffer): Int

Reads a sequence of bytes from this channel into the given buffer.

tryRead

abstract fun tryRead(dst: ByteBuffer): Int

Reads a sequence of bytes from this channel into the given buffer, if any bytes are immediately available.

Inheritors

CoroutineByteChannel

interface CoroutineByteChannel : ReadableCoroutineByteChannel, WritableCoroutineByteChannel

A co-routine channel that can read and write bytes.

ScatteringCoroutineByteChannel

interface ScatteringCoroutineByteChannel : ReadableCoroutineByteChannel

A channel that can read bytes into a sequence of buffers.