コード例 #1
0
        public override void Dispose()
        {
            lock (_lock)
            {
                if (_isDisposed) return;
                _isDisposed = true;
                ReTransmitNonx200FinalResponseTimer.Dispose();
                EndConfirmedTimer.Dispose();
                EndCompletedTimer.Dispose();
                SendTryingTimer.Dispose();

                SipAbstractServerTransaction tx;
                _table.TryRemove(this.GetId(), out tx);

                 _state = TerminatedState;
            }

            if (_stateObserver != null)
            {
                _stateObserver.OnNext(CreateStateInfo(_state.Name));
                _stateObserver.OnCompleted();
            }
        }
コード例 #2
0
        internal void ChangeState(AbstractStxState newstate)
        {
            /*attention: no locking. Is already called thread safely via call to SendResponse */
            _state = newstate;
            newstate.Initialize(this);

            if (_stateObserver != null) _stateObserver.OnNext(CreateStateInfo(newstate.Name));
        }