Exemple #1
0
        public void Start()
        {
            CheckPath();
            CheckHost();
            CheckPort();

            StartWebServer();

            _resetEvent.WaitOne();
            Console.WriteLine();
            Console.WriteLine("Server running!");
            Console.WriteLine("Add following URL to your podcast application:");
            Console.WriteLine($"http://{_argumentData.Host}:{_argumentData.Port}");
            Console.WriteLine("You can also try this URL in your mobile browser to check whether you can connect to this computer.");
            Console.WriteLine("Download all desired episodes and press a key to shut down the server afterwards.");

            Console.ReadLine();
            _httpServer.Stop();
            Console.WriteLine("Server stopped.");
        }
Exemple #2
0
 private void Cancel()
 {
     _httpServer?.Stop();
     throw new OperationCanceledException();
 }