NewTOAPIA.Net.Rtp.RtpSession.AddSsrcToIp C# (CSharp) 메소드

AddSsrcToIp() 개인적인 메소드

Verifies that the SSRC matches the IPAddress, if this is a known SSRC, and returns the associated RtpStream. If the SSRC is new, we add the IPAddress to the lookup table.
private AddSsrcToIp ( uint ssrc, IPAddress ipAddress ) : RtpStream
ssrc uint
ipAddress System.Net.IPAddress
리턴 RtpStream
        private RtpStream AddSsrcToIp(uint ssrc, IPAddress ipAddress)
        {
            IPStreamPair ipsp;
            lock(streamsAndIPs)
            {
                if (streamsAndIPs.ContainsKey(ssrc))
                {
                    ipsp = streamsAndIPs[ssrc];
                    if (!ipsp.senderIP.Equals(ipAddress))
                    {
                        HandleSSRCConflict(ssrc, ipAddress);
                    }
                }
                else
                {
                    ipsp = new IPStreamPair(ipAddress, null);
                    streamsAndIPs.Add(ssrc, ipsp);
                }
            }

            return ipsp.stream;
        }