WebRTC Data Channel server to clients UDP communication

后端 未结 2 1612
被撕碎了的回忆
被撕碎了的回忆 2021-01-04 07:20

Is it possible to use WebRTC Data Channels on Node.js in a way that mimics the functionality (and preferably API) of Socket.io (WebSockets) except using UDP?

In esse

2条回答
  •  甜味超标
    2021-01-04 07:45

    Yes, in theory you should be able to to do this. However, you'll need a node module that supports WebRTC data channels, so that you can connect to it like any other peer. Unfortunately, scanning through the current modules, I don't see one that implements the data channel.

    The other thing to note is the WebRTC data channels can be configured for different reliability modes with the reliable mode being implemented with SCTP (Firefox and Chrome).

    When testing the data channels I would recommend using Firefox since the WebRTC work was split such that Chrome initially focused on PeerConnection and Firefox on DataChannel (so Firefox is still ahead in their implementation of the DataChannel).

提交回复
热议问题