Close() public method

Closes the session's RTP and control ports.
public Close ( ) : void
return void
Beispiel #1
0
        public void Close(string reason)
        {
            if (!m_isClosed)
            {
                var report = GetRtcpReport();
                report.Bye = new RTCPBye(Ssrc, reason);
                SendRtcpReport(report);

                m_isClosed = true;
                m_rtcpReportTimer?.Dispose();
                m_rtpChannel.Close(reason);
            }
        }
Beispiel #2
0
        public void Close(string reason)
        {
            if (!m_isClosed)
            {
                var report = GetRtcpReport();
                report.Bye = new RTCPBye(Ssrc, reason);

                if (ControlDestinationEndPoint != null)
                {
                    SendRtcpReport(report);
                }

                m_isClosed = true;
                m_rtcpReportTimer?.Dispose();
                m_rtpChannel.Close(reason);
            }
        }