calculatePacketSize(packet)
Calculates the size of a Packet object.
You will use it when you want to manually create a Packet object, e.g not use the createPacket function.
words
An array of words.size
: A Number. The size of the packet.
import net from 'net';
import { calculatePacketSize } from 'frostbite-rcon-utils';
calculatePacketSize(['serverInfo', 'test', true, 0]); // => packet size