Exemplo n.º 1
0
        static void Main(string[] args)
        {
            var host = new HttpListenerHostWithConfiguration {
                Configuration = new Configurator()
            };

            host.Initialize(new[] { "http://+:9222/" }, "/", null);

            host.StartListening();
            System.Console.WriteLine("Press any key to exit.");
            System.Console.ReadKey();
            host.StopListening();
            host.Close();
        }
Exemplo n.º 2
0
 protected override void OnStop()
 {
     host.StopListening();
     host.Close();
 }