4 ms·
WebRTC is mostly about peer-to-peer communication (with a focus on audio and video support alongside data), whereas WebSockets is more about client-server commu
by matthewmacleod 8y ago
WebRTC is mostly about peer-to-peer communication (with a focus on audio and video support alongside data), whereas WebSockets is more about client-server communication. That is, a WebSocket connection needs to be made explicitly to some kind of server; WebRTC handles a peer-to-peer connection setup somewhat transparently.
WebRTC still needs to communicate between peers in order to set up that connection. In fact, many applications using it will use a WebSocket server to handle that initial communication – basically messages between the peers that say "this is where I am and how you can connect". In the case of this WebTTY project, this initial communication is encoded in the "connection data" that needs to be shared to set up the connection, so there's no need for that channel.