public static HttpListenerServer Create(HttpListenerServerListener listener, ServerTaskPoolOptions options, bool useSinglePool) { MethodContract.NotNull(listener, nameof(listener)); MethodContract.NotNull(options, nameof(options)); if (useSinglePool) { return(new HttpListenerServer(new SingleServerTaskPool <HttpContext>(listener, options), listener)); } else { return(new HttpListenerServer(new DualServerTaskPool <HttpContext>(listener, options), listener)); } }
private HttpListenerServer(ServerTaskPool <HttpContext> pool, HttpListenerServerListener listener) : base(pool) { this.listener = listener; }