public void StartServer() { if (_listener == null) { if (!MonitorLog.BuildRules(this.Config.Rule)) { throw new NoCaptureRuleException(); } if (this.Address == null) { throw new IPAddressNotBindException(); } _listener = new HttpListenerHelp(this.Address, this.Port, this.OnUpdataUrlLog) { ExceptionHandler = this.ExceptionHandler, }; _listener.Start(); Config.Ip = this.Address.ToString(); this.IsRunning = true; } }