interface CoroutineByteChannel : ReadableCoroutineByteChannel, WritableCoroutineByteChannel
(source)
A co-routine channel that can read and write bytes.
abstract suspend fun read(dst: ByteBuffer): Int
Reads a sequence of bytes from this channel into the given buffer. |
|
abstract fun tryRead(dst: ByteBuffer): Int
Reads a sequence of bytes from this channel into the given buffer, if any bytes are immediately available. |
|
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. |
|
abstract suspend fun write(src: ByteBuffer): Int
Writes a sequence of bytes to this channel from the given buffer. |
class CoroutineDatagramChannel : CoroutineByteChannel, ScatteringCoroutineByteChannel, GatheringCoroutineByteChannel, CoroutineNetworkChannel
A co-routine based datagram-oriented network channel. |
|
class CoroutineSocketChannel : CoroutineByteChannel, ScatteringCoroutineByteChannel, GatheringCoroutineByteChannel, CoroutineNetworkChannel
A co-routine based stream-oriented network channel. |