Пример #1
0
        protected override void OnStop()
        {
            _http.StopServer();
            _http.Dispose();
            _http = null;


        }
Пример #2
0
        protected override void OnStart(string[] args)
        {

            _http = new GWServerHttp(GWServerHttp.DefaultPort, new IGWClient[] { new GWClientMiLight(),
                                                                                  new GWClientNetworkInfo()});
            _http.StartServer();

        }
Пример #3
0
        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();
        }