public static Service StartService(string ip, string portstr) { MMOChannelService mmochannelService = new MMOChannelService(); ServiceInvoker.StartService(ip, portstr, mmochannelService); MMOChannelService.StartReporting(mmochannelService); return(mmochannelService); }
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); }