public void DoWork() { try { log_.Info("DNS DoWork -start-"); dnsServer_ = new HFTDnsServer(ipv4Address_, ipv6Address_); dnsServer_.Listen(port_); log_.Info("DNS DoWork -end-"); } catch (System.Exception ex) { log_.Error( "Could not start DNS Server on port:" + port_ + "\n" + "Did you run from the command line with sudo?\n\n" + ex.ToString()); } }
public void DoWork() { try { log_.Info("DNS DoWork -start- port:" + port_); dnsServer_ = new HFTDnsServer(ipv4Address_, ipv6Address_); dnsServer_.Listen(port_); log_.Info("DNS DoWork -end-"); } catch (System.Exception ex) { string msg = "Could not start DNS Server on port:" + port_ + "\n" + "Did you run from the command line with sudo?\n\n" + ex.ToString(); if (!HFTGlobalEventEmitter.GetInstance().QueueEvent(HFTGlobalEventType.Error, msg)) { // No one handled it. Let's do it ourselves. eventProcessor_.QueueEvent(() => { HFTDialog.MessageBox("ERROR", msg); }); } } }