Example #1
0
 public void OnDataChannel(DisposableDataChannelInterface dataChannel)
 {
     UnityJobs.Enqueue(() =>
     {
         foreach (var item in GetComponentsInChildren<WebRtcDataChannel>())
         {
             if (item.Matches(dataChannel))
             {
                 item.OnDataChannelCreated(dataChannel);
                 return;
             }
         }
     });
 }
Example #2
0
 public void OnDataChannelCreated(DisposableDataChannelInterface channel)
 {
     this.channel = channel;
     this.label   = channel.Label();
     channel.RegisterObserver(this);
 }
Example #3
0
 /// <summary>
 /// Tests if this Component instance could be the counterpart of the Data Channel
 /// </summary>
 public bool Matches(DisposableDataChannelInterface potential)
 {
     return(this.label == potential.Label() && this.type == Type.Remote);
 }