示例#1
0
        private void abort()
        {
            lock (_sync) {
                if (_state != ServerState.Start)
                {
                    return;
                }

                _state = ServerState.ShuttingDown;
            }

            try {
                try {
                    _listener.Stop();
                }
                finally {
                    _services.Stop(1006, String.Empty);
                }
            }
            catch {
            }

            _state = ServerState.Stop;
        }
        private void abort()
        {
            lock (_sync) {
                if (!IsListening)
                {
                    return;
                }

                _state = ServerState.ShuttingDown;
            }

            _services.Stop(new CloseEventArgs(CloseStatusCode.ServerError), true, false);
            _listener.Abort();

            _state = ServerState.Stop;
        }