public void Run(NetworkSession rSession, Packet rPacket)
        {
            if (this.mSession != rSession)
            {
                Debug.LogError("Network Session is not the same one.");
                return;
            }

            ushort nOpcode = rPacket.Opcode;
            byte   nFlag   = rPacket.Flag;

            NetworkOpcodeTypes rOpcodeTypeComponent = this.mSession.Parent.OpcodeTypes;
            Type   rResponseType = rOpcodeTypeComponent.GetType(nOpcode);
            object rMessage      = this.mMessagePacker.DeserializeFrom(rResponseType, rPacket.Bytes, Packet.Index, rPacket.Length - Packet.Index);

            Debug.LogError($"recv: {HotfixJsonParser.ToJsonNode(rMessage)}");

            // 非RPC消息走这里
            if ((nFlag & 0x01) == 0)
            {
                EventManager.Instance.Distribute(nOpcode, rMessage);
                return;
            }

            // Rpc回调消息
            IHotfixResponse rResponse = rMessage as IHotfixResponse;

            if (rResponse == null)
            {
                throw new Exception($"flag is response, but message is not! {nOpcode}");
            }
            Action <IHotfixResponse> rAction;

            if (!this.mRequestCallback.TryGetValue(rResponse.RpcId, out rAction))
            {
                return;
            }
            this.mRequestCallback.Remove(rResponse.RpcId);
            rAction(rResponse);
        }
        public string SerializeToText(object rObj)
        {
            JsonNode rJsonNode = HotfixJsonParser.ToJsonNode(rObj);

            return(rJsonNode.ToString());
        }
        public object DeserializeFrom(Type rType, string rStr)
        {
            JsonNode rJsonNode = HotfixJsonParser.Parse(rStr);

            return(rJsonNode.ToObject(rType));
        }
        public T DeserializeFrom <T>(string rStr)
        {
            JsonNode rJsonNode = HotfixJsonParser.Parse(rStr);

            return(rJsonNode.ToObject <T>());
        }