public Request(Server server, Host host, Connection connection) : base(String.Empty, String.Empty, null) { Server = server; Host = host; Connection = connection; ProcessorChain = RequestProcessorChainBuilder.Current.Build(); }
public void HostStopped() { _host = null; }
private Host GetHost() { if (_shutdownInProgress) { return null; } Host host = _host; if (host == null) { lock (this) { host = _host; if (host == null) { host = CreateWorkerAppDomainWithHost(_virtualPath, _physicalPath); host.Configure(this, _port, _virtualPath, _physicalPath); _host = host; } } } return host; }
public void Stop() { _shutdownInProgress = true; try { if (_socket != null) { _socket.Close(); } } catch { } finally { _socket = null; } try { if (_host != null) { _host.Shutdown(); } while (_host != null) { Thread.Sleep(100); } } catch { } finally { _host = null; } if (Stopped != null) { Stopped(this, new EventArgs()); } }