Hello All,
For my project I want to establish multiple WebRTC data channel connections (about 70-100 connections) to different servers from an iOS device. Is this a reasonable use case for using WebRTC? I am using the WebRTC.framework and not over a browser.
I also noticed that when I try to create a multiple peer connections simultaneously, the following function calls would sometimes not return and just hangs, kind of like a deadlock situation:
RTCPeerConnection.add(candidateMessage:)
RTCPeerConnection.setRemoveDescription(description:, completionHandler:)
RTCPeerConnection.close()
However, when I try to connect one after another (instead of simultaneously), everything is fine. Does the WebRTC library spawn multiple threads when trying to create a peer connection? It also seems like each open connection uses about 1-2% CPU constantly on iOS. Thus with 100 connections, I am seeing 100% CPU usage constantly, even when there is no traffic. Android on the other hand doesn't seem to have this issue. Once connected, the CPU drops down to zero when there is no traffic. Is this expected?
Any insight on this would be great, thanks!