3

I was reading and trying to find out about WebRTC's RTCDataChannel. As I understand Websockets are on top of TCP and have higher latency than SCTP that underlies WebRTC, when for example sending binary data between server and browser, that also could be 2 peers in WebRTC. When RTCDataChannel is set to unreliable mode (possible package loss but faster), its underlying SCTP becomes analogous to User Datagram Protocol (UDP) and when set to reliable it becomes TCP-like.

Is RTCDataChannel, when configured to be reliable (“TCP-like”), still faster then Websockets (TCP) and if so, how much faster?

David
  • 93
  • 10
  • I would imagine it very well could be because the messages don't have to be relayed through a central server. The shortest distance between two points is a "straight" line. – Benjamin Trent Nov 12 '15 at 13:48
  • I'm assuming the same condition for Websocket and WebRTC: sending reliable, binary data between browser and server, while when using WebRTC/RTCDataChannel, browser and server are two peers. What would be faster? Websocket or WebRTC? – David Nov 12 '15 at 14:52
  • I don't see why it would be any faster, when it pretty much has to provide the same guarantee, but feel free to measure. RTCDataChannel was not designed for server communication or to compete with websockets. – jib Nov 13 '15 at 02:43

0 Answers0