Exemple #1
0
        /// <summary>
        /// Cleans up any resources being used.
        /// </summary>
        private void Dispose()
        {
            if (m_IsDisposed)
            {
                return;
            }
            m_IsDisposed = true;

            m_pSource = null;

            OnDisposed();

            this.Disposed = null;
            this.Closed   = null;
        }
Exemple #2
0
        /// <summary>
        /// Default constructor.
        /// </summary>
        /// <param name="source">Owner RTP source.</param>
        /// <exception cref="ArgumentNullException">Is raised when <b>source</b> is null reference.</exception>
        internal RTP_SendStream(RTP_Source_Local source)
        {
            if (source == null)
            {
                throw new ArgumentNullException("source");
            }

            m_pSource = source;

            /* RFC 3550 4.
             *  The initial value of the sequence number SHOULD be random (unpredictable) to make known-plaintext
             *  attacks on encryption more difficult.
             */
            m_SeqNo = new Random().Next(1, 32000);
        }