示例#1
0
        protected override void OnReceived(string message)
        {
            if (message[0] != '\\')
            {
                return;
            }
            string[] recieved = message.TrimStart('\\').Split('\\');
            Dictionary <string, string> dict = GameSpyUtils.ConvertGPResponseToKeyValue(recieved);

            CommandSwitcher.Switch(this, dict);
        }
示例#2
0
        /// <summary>
        /// This function is fired when data is received from a stream
        /// </summary>
        /// <param name="stream">The stream that sended the data</param>
        /// <param name="message">The message the stream sended</param>
        protected override void ProcessData(string message)
        {
            message = message.Replace(@"\final\", "");
            string decodedmsg = GameSpyLib.Extensions.Enctypex.XorEncoding(message, 1);

            if (decodedmsg[0] != '\\')
            {
                return;
            }
            string[] recieved = decodedmsg.TrimStart('\\').Split('\\');
            Dictionary <string, string> dict = GameSpyUtils.ConvertGPResponseToKeyValue(recieved);

            CommandSwitcher.Switch(this, dict);
        }