Пример #1
0
 private void _ProtocolSubmit(PackageProtocolSubmit data)
 {
     if (_Comparison(_Protocol.VerificationCode, data.VerificationCode) == false)
     {
         ErrorVerifyEvent(_Protocol.VerificationCode, data.VerificationCode);
     }
 }
Пример #2
0
        protected void _OnResponse(ServerToClientOpCode id, byte[] args)
        {
            if (id == ServerToClientOpCode.Ping)
            {
                Ping = _PingTimeCounter.Ticks;
                _StartPing();
            }
            else if (id == ServerToClientOpCode.SetProperty)
            {
                PackageSetProperty data = args.ToPackageData <PackageSetProperty>(_Serializer);
                _UpdateSetProperty(data.EntityId, data.Property, data.Value);
            }

            else if (id == ServerToClientOpCode.InvokeEvent)
            {
                PackageInvokeEvent data = args.ToPackageData <PackageInvokeEvent>(_Serializer);
                _InvokeEvent(data.EntityId, data.Event, data.HandlerId, data.EventParams);
            }
            else if (id == ServerToClientOpCode.ErrorMethod)
            {
                PackageErrorMethod data = args.ToPackageData <PackageErrorMethod>(_Serializer);

                _ErrorReturnValue(data.ReturnTarget, data.Method, data.Message);
            }
            else if (id == ServerToClientOpCode.ReturnValue)
            {
                PackageReturnValue data = args.ToPackageData <PackageReturnValue>(_Serializer);
                _SetReturnValue(data.ReturnTarget, data.ReturnValue);
            }
            else if (id == ServerToClientOpCode.LoadSoulCompile)
            {
                PackageLoadSoulCompile data = args.ToPackageData <PackageLoadSoulCompile>(_Serializer);

                _LoadSoulCompile(data.TypeId, data.EntityId, data.ReturnId, data.PassageId);
            }
            else if (id == ServerToClientOpCode.LoadSoul)
            {
                PackageLoadSoul data = args.ToPackageData <PackageLoadSoul>(_Serializer);

                _LoadSoul(data.TypeId, data.EntityId, data.ReturnType);
            }
            else if (id == ServerToClientOpCode.UnloadSoul)
            {
                PackageUnloadSoul data = args.ToPackageData <PackageUnloadSoul>(_Serializer);

                _UnloadSoul(data.TypeId, data.EntityId, data.PassageId);
            }
            else if (id == ServerToClientOpCode.ProtocolSubmit)
            {
                PackageProtocolSubmit data = args.ToPackageData <PackageProtocolSubmit>(_Serializer);

                _ProtocolSubmit(data);
            }
        }
Пример #3
0
 private void _ProtocolSubmit(PackageProtocolSubmit data)
 {
     _Active = _Comparison(_Protocol.VerificationCode, data.VerificationCode);
 }