writePacket

open suspend fun writePacket(packet: ByteReadPacket): Unit

Overrides ByteWriteChannel.writePacket

Writes a packet fully or fails if channel get closed before the whole packet has been written