protected override void OnStop() { _http.StopServer(); _http.Dispose(); _http = null; }
protected override void OnStart(string[] args) { _http = new GWServerHttp(GWServerHttp.DefaultPort, new IGWClient[] { new GWClientMiLight(), new GWClientNetworkInfo()}); _http.StartServer(); }
static void Main(string[] args) { ConsoleKeyInfo cki; GWServerHttp http = new GWServerHttp(GWServerHttp.DefaultPort, new IGWClient[] { new GWClientMiLight(), new GWClientNetworkInfo()}); http.StartServer(); Console.WriteLine("Press the Escape (Esc) key to quit: \n"); do { cki = Console.ReadKey(); } while (cki.Key != ConsoleKey.Escape); http.StopServer(); http.Dispose(); }