Shutdown() public method

public Shutdown ( ) : void
return void
Example #1
0
        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;
            }
        }
Example #2
0
        /// <summary>
        ///
        /// </summary>
        public void Stop()
        {
            _shutdownInProgress = true;
            OnServerStopped(new ServerEventArgs(RootUrl));

            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;
            }
        }
Example #3
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;
            }
        }