Example #1
0
        protected virtual void OnRecv(InputMessage message)
        {
            if (ChecksumEnabled && !message.ReadChecksum())
            {
                throw new Exception("Unable to read checksum.");
            }

            //CheckCompression(message);
            if (XteaEnabled)
            {
                try {
                    XteaDecrypt(message);
                } catch (Exception e) {
                    throw new Exception("Protocol.OnRecv: Failed to decrypt the message.\n" + e);
                }
            }
        }