readRemaining

suspend fun ByteReadChannel.readRemaining(
    limit: Int = Int.MAX_VALUE
): ByteReadPacket

Reads all the bytes from receiver channel and builds a packet that is returned unless the specified limit exceeded. It will simply stop reading and return packet of size limit in this case