예제 #1
0
 public override void Dispatch(BasePacket packet)
 {
     if (packet.ProcessType == PacketEnum.ProcessType.RPC &&
         MEngine.Instance.IsServer == true)
     {
         // RPC Handling
         RPCGateWay.PushPacket(packet);
         RPCWait.Set();
     }
     else
     {
         // Logic Handling
         LogicGateWay.PushPacket(packet);
         LogicWait.Set();
     }
 }
예제 #2
0
        public void RPCThreadProcess()
        {
            while (IsLogicEnd == false)
            {
                RPCWait.WaitOne();

                BasePacket packet;

                do
                {
                    packet = RPCGateWay.PopPacket();

                    if (packet != null)
                    {
                        RPCService.ProcessRPCService(packet);
                    }
                } while (RPCGateWay.Count() != 0);
            }
        }