示例#1
0
        public static Service StartService(string ip, string portstr)
        {
            MMOChannelService mmochannelService = new MMOChannelService();

            ServiceInvoker.StartService(ip, portstr, mmochannelService);
            MMOChannelService.StartReporting(mmochannelService);
            return(mmochannelService);
        }
示例#2
0
        private static void StartReporting(MMOChannelService serv)
        {
            if (!ServiceCore.FeatureMatrix.IsEnable("ServiceReporter"))
            {
                return;
            }
            int num = ServiceReporterSettings.Get("MMOChannelService.Interval", 60);

            ServiceReporter.Instance.Initialize("MMOChannelService");
            ServiceReporter.Instance.AddGathering("Stat", new ServiceReporter.GatheringDelegate <int>(serv.OnGatheringStat));
            ServiceReporter.Instance.Start(num * 1000);
        }