Exemple #1
0
        /// <summary>
        /// Sends an SCTP control packet with an abort chunk to terminate
        /// the association.
        /// </summary>
        /// <param name="errorCause">The cause of the abort.</param>
        public void Abort(ISctpErrorCause errorCause)
        {
            if (!_wasAborted)
            {
                _wasAborted = true;
                bool tBit       = _remoteVerificationTag != 0;
                var  abortChunk = new SctpAbortChunk(tBit);
                abortChunk.AddErrorCause(errorCause);

                SendChunk(abortChunk);

                OnAborted?.Invoke(errorCause.CauseCode.ToString());

                _dataSender.Close();
            }
        }
Exemple #2
0
 protected virtual void RaiseOnAbort(OnAbortedArgs e)
 {
     OnAborted?.Invoke(this, e);
 }