ktor-io / io.ktor.utils.io.core / ByteReadPacket / copy

copy

fun copy(): ByteReadPacket

Returns a copy of the packet. The original packet and the copy could be used concurrently. Both need to be either completely consumed or released via release