3 ms·
I'd love to see a minimal example of a) client and server that only use the WebRTC data connection for low latency UDP based communications b) a p2p example f
by Tepix 9y ago
I'd love to see a minimal example of
a) client and server that only use the WebRTC data connection for low latency UDP based communications
b) a p2p example for a group of clients using WebRTC data connection
This website seems to cover b) but not a)
- brkho 9y agoI wrote a blog post about WebRTC data channels which has the complete source for a proof of concept in a gaming context: http://blog.brkho.com/2017/03/15/dive-into-client-server-web-games-webrtc/ http://blog.brkho.com/2017/03/15/dive-into-client-server-web... The example in my blog post isn't really minimal because it assumes that you're writing your server in C++ for performance reasons. You can cut away a lot of the setup and boilerplate if you're fine with your server running on node and delegating all WebRTC tasks to a background electron process (see electron-webrtc). Also, recently Mozilla has released their own WebRTC abstraction (https://hacks.mozilla.org/2017/06/introducing-humblenet-a-cross-platform-networking-library-that-works-in-the-browser/ https://hacks.mozilla.org/2017/06/introducing-humblenet-a-cr...) which seems to be easy to use on the server. I personally haven't tried it yet, but I've heard good things.
- lxtx 9y agoYou might want to check out the project I've been working on: https://github.com/seemk/WebUdp https://github.com/seemk/WebUdp It's a minimal WebRTC server implementation (SDP, STUN, SCTP, DTLS and everything else) contained in a single library. Note that it only implements a subset of the specs to get it working and probably still is buggy (experimental!) as I'm developing it while working on another project that uses it.
- 49531 9y agoHey this is awesome. I've been working on a webrtc project and will def look into using this!
- j_s 9y agohttps://news.ycombinator.com/item?id=13741520 https://news.ycombinator.com/item?id=13741520 links https://github.com/js-platform/node-webrtc/blob/develop/examples/bridge.js https://github.com/js-platform/node-webrtc/blob/develop/exam... but I can't tell if it covers everything you need. I recommend reviewing that specific sub-discussion and possibly the whole of https://news.ycombinator.com/item?id=13741155 https://news.ycombinator.com/item?id=13741155 from almost 5 months ago.
- deleted 9y ago[deleted]