public Request(Server server, Host host, Connection connection) : base(String.Empty, String.Empty, null) { _server = server; _host = host; _connection = connection; }
public void HostStopped() { _host = null; }
Host GetHost() { if (_shutdownInProgress) return null; Host host = _host; if (host == null) { lock (this) { host = _host; if (host == null) { host = (Host)CreateWorkerAppDomainWithHost(_virtualPath, _physicalPath, typeof(Host)); 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; } }