Hello friends,
I need to make a P2P connection over the Internet. I want to explain my design before writing the code:
The idea is that I have a public server with a known IP.
Two clients connect to the server that want to connect to each other. The clients may be behind a firewall, they may be Natted, and may expose a single public IP.
They tell the server their port number they will be listening on.
The server detects their public IP
The server tells both nodes the public IP and port number of the other node
Each node sends a outbound "Hello" message to that port and IP
The two nodes establish a communication channel
Will this work ?