tuweni / org.apache.tuweni.net.coroutines / ScatteringCoroutineByteChannel

ScatteringCoroutineByteChannel

interface ScatteringCoroutineByteChannel : ReadableCoroutineByteChannel (source)

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

Functions

read

abstract suspend fun read(dsts: Array<ByteBuffer>, offset: Int = 0, length: Int = dsts.size): Long

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

tryRead

abstract fun tryRead(dsts: Array<ByteBuffer>, offset: Int = 0, length: Int = dsts.size): Long

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

Inherited 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

CoroutineDatagramChannel

class CoroutineDatagramChannel : CoroutineByteChannel, ScatteringCoroutineByteChannel, GatheringCoroutineByteChannel, CoroutineNetworkChannel

A co-routine based datagram-oriented network channel.

CoroutineSocketChannel

class CoroutineSocketChannel : CoroutineByteChannel, ScatteringCoroutineByteChannel, GatheringCoroutineByteChannel, CoroutineNetworkChannel

A co-routine based stream-oriented network channel.