/// <summary> /// ProcessRequest /// </summary> public void ProcessRequest() { HttpListenerContext ctx = null; try { ctx = FListener.GetContext(); } catch (ThreadAbortException) { Console.WriteLine("Server stopped probably because a file in the application directory was changed"); return; } TMyHttpWorkerRequest workerRequest = new TMyHttpWorkerRequest(ctx, FVirtualDir, FPhysicalDir); (new Thread(() => ProcessRequest(workerRequest))).Start(); }
/// <summary> /// to be called by a new thread per request /// </summary> private void ProcessRequest(TMyHttpWorkerRequest r) { HttpRuntime.ProcessRequest(r); }