javascript - WebRTC Data Channel server to clients UDP communication - Stack Overflow

Is it possible to use WebRTC Data Channels on Node.js in a way that mimics the functionality (and prefe

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 essence I want to have a server running Node.js with which browser clients can establish a full duplex bi directional UDP connection via JavaScript.

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 essence I want to have a server running Node.js with which browser clients can establish a full duplex bi directional UDP connection via JavaScript.

Share Improve this question edited Jun 19, 2014 at 11:59 Willem asked Jul 11, 2013 at 23:31 WillemWillem 1,1021 gold badge13 silver badges24 bronze badges
Add a ment  | 

2 Answers 2

Reset to default 8 +25

There is a WebRTC module for node.js: https://js-platform.github.io/node-webrtc/

The installation can be really cumbersome (to say the least) but if you succeed you'll be able to make your node.js server act as a WebRTC peer just as browsers do. This way you'd be able to open a Data Channel between a browser and your node.js server.

We have this in use in our research project to evaluate performance characteristics.

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 remend 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).

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1743704583a4493149.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信