static void Main(string[] _) { HttpListener listener = new HttpListener(8000); listener.Listen(10); Console.ReadKey(true); }
internal static IObservable <HttpListenerContext> GetContextsAsObservable(this HttpListener listener) { try { return(listener.Listen().Concat()); } catch (Exception ex) { #if DEBUG _log.Error("Exception concatenating listenercontext into an observable", ex); #endif throw; } }