コード例 #1
0
ファイル: GWService.cs プロジェクト: 2B2i/2B2i.Dom
        protected override void OnStop()
        {
            _http.StopServer();
            _http.Dispose();
            _http = null;


        }
コード例 #2
0
ファイル: GWService.cs プロジェクト: 2B2i/2B2i.Dom
        protected override void OnStart(string[] args)
        {

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

        }
コード例 #3
0
ファイル: Program.cs プロジェクト: 2B2i/2B2i.Dom
        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();
        }