WebRTC Data Channel server to clients UDP communication. Is it currently possible?

前端 未结 2 1709
日久生厌
日久生厌 2020-12-29 15:04

Is it possible to use WebRTC Data Channels on Node.js in a way that mimics the functionality of WebSockets except using UDP?

In essence I want to have a server runni

相关标签:
2条回答
  • 2020-12-29 15:27

    We have implemented the exact same thing: a server/client way of using WebRTC. Besides we also implemented data port multiplexing, so that server would only need to expose one data port for all rtcdata channels.

    A quick summary of how it is achieved:

    • We implemented in nodejs, using wrtc library. But the same principal could be applied to other implementations.
    • The server exposes a control port, so that the client will exchange SDPs with the server for establishing their data channel.
    • To support data port multiplexing, At the server, we modify both peer's SDK, so that
      1. Client will always connect to the same server ip:data_port
      2. We implement a UDP data proxy inside the server, so that it can be the bridge between the server webrtc engine and the client.

    The code is at: https://github.com/noia-network/webrtc-direct

    0 讨论(0)
  • 2020-12-29 15:35

    This project is very active, and seem to undertake the mission of importing the entire WebRTC stack into node.js There's also this project but it looks pretty inactive.

    Would love to know if that was satisfying and if you're doing such a project (as in the question) please link to github :)

    0 讨论(0)
提交回复
热议问题