+ cpc.onicecandidate = (event) => {
+ if (event.candidate) {
+ console.log('Client: Sending ice candidate to host')
+ pollServer(window.location, wsock.send(JSON.stringify({
+ cmd: '> ice pubkey',
+ ice: event.candidate,
+ pubKey: cpk /* TODO: do we need to send this? */
+ })), pollServerTimeout)
+ }
+ else {
+ /* Set up data channel here */
+ console.log('Client: Finished setting up ICE candidates')
+ }
+ }
+ /* TODO: start polling for ice candidates, and then addIceCandidate() to cpc */
+ //pollServer(window.location, {ice}, pollServerTimeout)
+
+