writePacket

suspend fun ByteWriteChannel.writePacket(copy: Buffer)


suspend fun ByteWriteChannel.writePacket(source: Source)

Writes the entire source contents to the ByteChannel. Prevents memory exhaustion by waiting for buffer to flush.