コード例 #1
0
 // Just for fun (and to regression-test bug 2302) make sure that DataChannels
 // can be created, queried, and disposed.
 private static void createDataChannelToRegressionTestBug2302(PeerConnection pc) {
   DataChannel dc = pc.createDataChannel("dcLabel", new DataChannel.Init());
   abortUnless("dcLabel".equals(dc.label()), "Unexpected label corruption?");
   dc.close();
   dc.dispose();
 }
コード例 #2
0
 @Override
 public void onDataChannel(final DataChannel dc) {
   reportError("AppRTC doesn't use data channels, but got: " + dc.label() + " anyway!");
 }
コード例 #3
0
 @Override
 public void onStateChange() {
   Log.d(TAG, dataChannel.label() + ":" + dataChannel.state().toString());
 }