copyTo

suspend fun ByteChannelSequentialBase.copyTo(dst: ByteChannelSequentialBase, limit: Long = Long.MAX_VALUE): Long


suspend fun ByteReadChannel.copyTo(dst: ByteWriteChannel): Long

Reads bytes from receiver channel and writes them to dst channel. Closes dst channel if fails to read or write with cause exception.

Return

a number of copied bytes


expect suspend fun ByteReadChannel.copyTo(dst: ByteWriteChannel, limit: Long): Long

Reads up to limit bytes from receiver channel and writes them to dst channel. Closes dst channel if fails to read or write with cause exception.

Return

a number of copied bytes

actual suspend fun ByteReadChannel.copyTo(dst: ByteWriteChannel, limit: Long): Long

Reads up to limit bytes from receiver channel and writes them to dst channel. Closes dst channel if fails to read or write with cause exception.

Return

a number of copied bytes

actual suspend fun ByteReadChannel.copyTo(dst: ByteWriteChannel, limit: Long): Long

Reads up to limit bytes from receiver channel and writes them to dst channel. Closes dst channel if fails to read or write with cause exception.

Return

a number of copied bytes