Esempio n. 1
0
        private void RegisterDataChannelCreatedCallback()
        {
            _webRtcDataChannelCreatedCallback = (handle, dataChannelHandle, _) =>
            {
                Log.Debug(WebRTCLog.Tag, "Invoked");

                DataChannel?.Invoke(this, new WebRTCDataChannelEventArgs(dataChannelHandle));
            };

            NativeDataChannel.SetCreatedByPeerCb(Handle, _webRtcDataChannelCreatedCallback).
            ThrowIfFailed("Failed to set data channel created callback.");
        }
Esempio n. 2
0
 /// <summary>
 /// 新的数据通道打开了
 /// </summary>
 /// <param name="channel">新的数据通道</param>
 internal void emitDataChannel(RTCDataChannel channel)
 {
     DataChannel?.Invoke(channel);
 }