Inheritance: IDisposable
Exemplo n.º 1
0
        public static SimpleServer Create(
            string url,
            Action<HttpListenerContext> handler,
            AuthenticationSchemes authenticationSchemes = AuthenticationSchemes.Anonymous)
        {
            var listener = new HttpListener { Prefixes = { url }, AuthenticationSchemes = authenticationSchemes };
            var server = new SimpleServer(listener, handler);

            server.Start();
            return server;
        }
Exemplo n.º 2
0
 public static SimpleServer Create(string url, Action<HttpListenerContext> handler)
 {
     var server = new SimpleServer(new HttpListener { Prefixes = { url } }, handler);
     server.Start();
     return server;
 }