Closed lxlenovostar closed 6 years ago
Yes, this is right, you don't need need external signalling or STUN. WebUDP is meant to have a public IP and it has built-in signalling and STUN. The default Linux C++ implementation (epoll) uses HTTP for signalling.
Do you have a plan which implement WebUDP can used in a network behind NAT? If WebUDP can achieve this function, a P2P network can build between WebUDP and chrome. In addition, we can use WebUDP on Embedded equipment and Mobile devices.
Thank you.
I think it is possible to run WebUDP behind a NAT, but you will need another coordinator server with a public address to do the UDP hole punching via STUN or some other method. Basically: 1) WebUDP registers with a coordinator server, the coordinator now knows WebUDP's public IP, port. 2) Browser clients get WebUDP's server address from the coordinator. 3) Browser clients initiate a connection to WebUDP
Keep in mind that the moment there is no client mode for WebUDP, it can't initiate a connection itself to other servers or browsers, but I've been thinking of adding that feature.
If you want to run it on mobile devices or embedded equipment, there's also an option to write your own host implementation using libWu (Wu.h). The default Linux C++ host uses HTTP over a TCP socket to exchange SDPs, but it is very much possible to use UDP for the SDP exchange as well (via a coordinator server, not directly from the browser), so you would only need to open an UDP port on the device.
Do you have a TODO list? In this case, others can participate.
Thank you.
It does now :) I added 2 issues with the "enhancement" label, these are the ones that have been in the back of my mind, but not important for myself.
I read the examples/EchoExamples.cpp, I can't find query a stun server and a signaling server. If we want to P2P between WebUDP and chrome(js) in a network behind NAT, we should use a stun server and a signaing server. I think WebUDP will install on the server and have a public IP, so we don't need stun server and signaling server. This is right?
Thank you.