Function setPacketHeader

Set packet length and number. It's important that the length of packet has already been set to the final state as its length is used.

void setPacketHeader (
  ref ubyte[] packet,
  ubyte packetNumber
) pure nothrow @safe;