Search code examples
websocketwebrtcpeerpeerjs

Why does the PeerJS PeerServer use WebSockets?


The code of the PeerServer for PeerJS mostly consists of WebSockets. I don't see any references to WebRTC.

Why are they using WebRTC for connections to the PeerServer? Is this not possible using WebRTC?

In that case, are there really any differences between using Socket.IO or PeerJS for sending messages between clients?


Solution

  • WebRTC only contemplates the connection part between to peers that know each other, as the discovering part is left to be solved by another tool, peerjs is a good tool to that matter...