private Host GetHost() { if (_IsShutdownInProgress) return null; var host = _Host; if (host == null) { lock (this) { host = _Host; if (host == null) { host = (Host)CreateWorkerAppDomainWithHost(Website.VirtualRoot, Website.PhysicalPath, typeof(Host)); host.Configure(this, Website.Port, Website.VirtualRoot, Website.PhysicalPath); _Host = host; } } } return host; }
public Request(Server server, Host host, Connection connection) : base(String.Empty, String.Empty, null) { _server = server; _host = host; _connection = connection; }
public Connection(Host host, Socket socket) { _host = host; _socket = socket; }
public Connection(Host host, Socket socket) { this._host = host; this._socket = socket; }
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; } }
public Request(Host host, Connection conn) : base(String.Empty, String.Empty, null) { _host = host; _conn = conn; }
private void CreateHost() { this._host = (Host)ApplicationHost.CreateApplicationHost(typeof(Host), this._virtualPath, this._physicalPath); //this._host = CreateWorkerAppDomianWithHost(this._virtualPath, this._physicalPath, typeof(Host)) as Host; this._host.Configure(this, this._port, this._virtualPath, this._physicalPath, this._installPath); }
private void CreateHost() { _host = (Host)ApplicationHost.CreateApplicationHost(typeof(Host), _virtualPath, _physicalPath); _host.Configure(this, _port, _virtualPath, _physicalPath, _installPath); }
public void Stop() { _shutdownInProgress = true; try { if (_mongrel2Connection != null) { _mongrel2Connection.Dispose(); } } catch { } finally { _mongrel2Connection = null; } try { if (_host != null) { _host.Shutdown(); } while (_host != null) { Thread.Sleep(100); } } catch { } finally { _host = null; } }
private Host GetHost() { if (_shutdownInProgress) return null; Host host = _host; if (host == null) { lock (this) { host = _host; if (host == null) { // Put together some unique app id based on the virtual and physical paths string uniqueAppString = String.Concat(_virtualPath, _physicalPath).ToLowerInvariant(); string appId = (uniqueAppString.GetHashCode()).ToString("x", CultureInfo.InvariantCulture); _host = (Host)_appManager.CreateObject(appId, typeof(Host), _virtualPath, _physicalPath, false /*failIfExists*/); _host.Configure(this, _port, _virtualPath, _physicalPath); host = _host; } } } return host; }
internal void HostStopped() { _host = null; }
public Request(Host host, Connection conn) : base(string.Empty, string.Empty, null) { this._host = host; this._conn = conn; }
public void Stopped() { _Host = null; }