private int SendCommandPacket(BattlEyeCommand command, string parameters = "")
{
int packetID = sequenceNumber;
sequenceNumber = (sequenceNumber == 255) ? 0 : sequenceNumber + 1;
try
{
if (!socket.Connected)
return 256;
byte[] packet = ConstructPacket(BattlEyePacketType.Command, packetID, Helpers.StringValueOf(command) + parameters);
packetSent = DateTime.Now;
packetQueue.Add(packetID, new string[] {Helpers.StringValueOf(command) + parameters, packetSent.ToString()});
}
catch
{
return 256;
}
return packetID;
}