I recently downloaded and tried Intel's WebRTC and looked into the Peer to Peer connection. I ran the woogeenp2p sample project from CS_WebRTC_Client_SDK_Android.v3.0 on Android Studio (version 2.1.2) and was able to get two clients to communicate with each other using an http connection to the sample peer server (PeerServer-Release-3.0) on node.js (version 4.4.5).
An http connection using myIP:8095 to the sample server is successful, however when I try an https connection, under port 8096, the connection to the server fails.
Messages from Android Monitor are as follows:
07-12 09:13:36.290 2613-3061/com.intel.webrtc.p2p.sample D/WooGeen-PeerClient: PeerClient State:CONNECTING
07-12 09:13:36.336 2613-10564/com.intel.webrtc.p2p.sample D/WooGeen-PeerClient: PeerClient State:DISCONNECTED
07-12 09:13:36.336 2613-10564/com.intel.webrtc.p2p.sample D/WooGeen-Activity: Failed to connect server:Socket.IO reports connect to signaling server failed.
07-12 09:13:37.705 2613-10587/com.intel.webrtc.p2p.sample D/WooGeen-Activity: Failed to connect server:Socket.IO reports connect to signaling server failed.
07-12 09:13:38.344 2613-3062/com.intel.webrtc.p2p.sample E/Surface: getSlotFromBufferLocked: unknown buffer: 0xaaa26130
...with repeated attempts and messages of the failed connection and unknown buffer...
The server does not detect anything from the requesting https client at all. Is this a certificate problem? I tried the provided certificates for the server as well as my own self signed certificates generated using OpenSSL (both with and without a password), however all results turned up negative. Did the Android client need a certificate as well? I dug around the client code and did not find any usage of certificates.
Testing on Windows 10 machine.
Client code ran on Android Studio's Nexus 5X Emulator API 23 (Android 6.0)
I think I solved the problem. It was a certificate issue.
For the Android peer to peer client, I did not find any usage of certificates when the client created a socket to connect to the signaling server. Therefore, I created a SSLContext containing my CA and loaded it into the socket. I also added the IO options: sslContext (IO.Options.sslContext = mySslContext) and secure (IO.Options.secure = true).