NewTOAPIA.Net.Rtp.RtpSession.CheckForCNameConflict C# (CSharp) Method

CheckForCNameConflict() private method

Determine if there is a CNameConflict between the local participant and a remote participant or 2 remote participants. If the conflict involves a local participant, raise the event and then Dispose the RtpSession, bringing it back to a clean state. If it is a remote conflict, do nothing, as we will eventually receive the Rtcp data from them.
private CheckForCNameConflict ( string cname, IPAddress ipAddresses ) : void
cname string
ipAddresses System.Net.IPAddress
return void
        private void CheckForCNameConflict(string cname, IPAddress[] ipAddresses)
        {
            Trace.Assert(ipAddresses.Length == 2);

            // If the IPAddresses don't match
            if (!ipAddresses[0].Equals(ipAddresses[1]))
            {
                // Is the conflict with the local participant
                if (participant.CName == cname)
                {
                    RaiseDuplicateCNameDetectedEvent(ipAddresses);

                    // WARNING:
                    // You can not call Dispose from this thread, as it will terminate itself!
                    ThreadPool.QueueUserWorkItem(new WaitCallback(Dispose));
                }
                else // Or remote streams
                {
                    // Don't do anything here.  The machines encountering the conflict will dispose
                    // themselves and we will receive the Rtcp updates about them leaving the session

                    //eventLog.WriteEntry(string.Format(CultureInfo.CurrentCulture, 
                    //    Strings.CNameConflictDetectedRemoteMachines, ipAddresses[0], ipAddresses[1], cname), 
                    //    EventLogEntryType.Warning, (int)RtpEL.ID.HandleCNameConflict);
                }
            }
        }