コード例 #1
0
ファイル: PackServer.cs プロジェクト: yymqwl/KcpServer
        public virtual void ParseMsg(PackPeer packpeer, byte[] bytes)
        {
            MsgBase ma = new MsgBase();

            if (!ma.Deserialize(bytes))
            {
                AppModules.Instance.LogManager.Log.Error(string.Format("ParseMsg error {0}", packpeer.Get_RemoteEndPoint().ToString()));
                return;
            }
            try
            {
                EventMsgPool.FireEvent(ma.MsgHead.m_msgid, packpeer, ma);
            }
            catch (Exception e)
            {
                AppModules.Instance.LogManager.Log.Error(string.Format("MsgId:{0}--exception", ma.MsgHead.m_msgid, e.ToString()));
            }
        }