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(); } }
public void RPCThreadProcess() { while (IsLogicEnd == false) { RPCWait.WaitOne(); BasePacket packet; do { packet = RPCGateWay.PopPacket(); if (packet != null) { RPCService.ProcessRPCService(packet); } } while (RPCGateWay.Count() != 0); } }