As some of you know, I’m working on an Rcon Manger for COD4/5. Some of you want to know how I am parsing/prepping the command to be sent. I’ll share with you my method of parsing the command. I don’t want to divulge too much information as I’m not done with the project yet.
public byte[] prepCommand(string command)
{
byte[] bufferTemp = Encoding.ASCII.GetBytes(command);
byte[] bufferSend = new byte[bufferTemp.Length + 4];
//intial 5 characters as per standard
bufSend[0] = byte.Parse("255");
bufSend[1] = byte.Parse("255");
bufSend[2] = byte.Parse("255");
bufSend[3] = byte.Parse("255");
//copying bytes from rcon to send buffer
int j = 4;
for (int i = 0; i < bufferTemp.Length; i++)
{
bufferSend[j++] = bufferTemp[i];
}
return bufferSend;
}











































thanks for psoting the code