예제 #1
0
        private void OnConnected(object sender, ClientEvents.ConnectedEventArgs ea)
        {
            if (_context.Client != sender)
            {
                return;
            }
            _firstConnectServer = false; //连接成功后,就重置状态

            if (this.Connected != null)
            {
                this.Connected(sender, ea);
            }
        }
예제 #2
0
        /// <summary>
        /// 成功连接时
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="ea"></param>
        private void OnConnected(object sender, ClientEvents.ConnectedEventArgs ea)
        {
            if (sender != this.Client)
            {
                return;
            }

            InitUnicastChannel();
            HookRtpEvents();

            if (this.Active != null)
            {
                this.Active(this, EventArgs.Empty);
            }
        }