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

CoroutineByteChannel

interface CoroutineByteChannel : ReadableCoroutineByteChannel, WritableCoroutineByteChannel (source)

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

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.

tryWrite

abstract fun tryWrite(src: ByteBuffer): Int

Writes a sequence of bytes to this channel from the given buffer, if the channel is ready for writing.

write

abstract suspend fun write(src: ByteBuffer): Int

Writes a sequence of bytes to this channel from the given buffer.

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.