コード例 #1
0
        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;
            }
        }
コード例 #2
0
 /// <summary>
 /// This takes ownership of the mongrel2Connection.  It will be disposed when the server is stopped
 /// and the connection should probably not be reused anyways due to the threading issue with
 /// ZMQ.
 /// </summary>
 /// <param name="mongrel2Connection"></param>
 /// <param name="virtualPath"></param>
 /// <param name="physicalPath"></param>
 public Server(m2net.Connection mongrel2Connection, string virtualPath, string physicalPath)
 {
     _mongrel2Connection = mongrel2Connection;
     _virtualPath        = virtualPath;
     _physicalPath       = physicalPath[physicalPath.Length - 1] == Path.DirectorySeparatorChar ? physicalPath : physicalPath + Path.DirectorySeparatorChar;
 }
コード例 #3
0
ファイル: Server.cs プロジェクト: kxie/m2net
 /// <summary>
 /// This takes ownership of the mongrel2Connection.  It will be disposed when the server is stopped
 /// and the connection should probably not be reused anyways due to the threading issue with
 /// ZMQ.
 /// </summary>
 /// <param name="mongrel2Connection"></param>
 /// <param name="virtualPath"></param>
 /// <param name="physicalPath"></param>
 public Server(m2net.Connection mongrel2Connection, string virtualPath, string physicalPath)
 {
     _mongrel2Connection = mongrel2Connection;
     _virtualPath = virtualPath;
     _physicalPath = physicalPath[physicalPath.Length - 1] == Path.DirectorySeparatorChar ? physicalPath : physicalPath + Path.DirectorySeparatorChar;
 }
コード例 #4
0
ファイル: Server.cs プロジェクト: kxie/m2net
        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;
            }
        }