/// <summary> /// Takes a message sent through the Stream and sends back a response /// </summary> /// <param name="message"></param> protected void ParseRequest(string message) { string[] data = message.Split(new char[] { '\x00' }, StringSplitOptions.RemoveEmptyEntries); //string gamename = data[1].ToLowerInvariant(); string validate = data[2].Substring(0, 8); string filter = FixFilter(data[2].Substring(8)); string[] fields = data[3].Split(new char[] { '\\' }, StringSplitOptions.RemoveEmptyEntries); // Send the encrypted serverlist to the client byte[] unencryptedServerList = PackServerList(filter, fields); Stream.SendAsync( Enctypex.Encode( Encoding.UTF8.GetBytes("hW6m9a"), // Battlfield 2 Handoff Key Encoding.UTF8.GetBytes(validate), unencryptedServerList, unencryptedServerList.LongLength ) ); }