/// <summary>
        /// Stops this instance.
        /// </summary>
        public override void Stop()
        {
            if (this.ToMulticast && ForwardInterleavedCommand >= 0)
            {
                IPAddress multicastAdress = IPAddress.Parse(this.ForwardHostVideo);
                ListenCUdpPort.DropMulticastGroup(multicastAdress);
            }

            ForwardCommand.DataReceived -= this.HandleDataReceive;

            ListenCUdpPort.Close();
            ForwardVUdpPort.Close();
        }
Esempio n. 2
0
        /// <summary>
        /// Stops this instance.
        /// </summary>
        public override void Stop()
        {
            if (this.ToMulticast && ForwardPortCommand > 0)
            {
                IPAddress multicastAdress;
                if (IPAddress.TryParse(this.ForwardHostVideo, out multicastAdress))
                {
                    ListenCUdpPort.DropMulticastGroup(multicastAdress);
                }
            }

            _listenVUdpPort.Close();
            ListenCUdpPort.Close();
            ForwardVUdpPort.Close();
            _forwarCUdpPort.Close();
        }