I have a server on Internet that can send and receive datagrams.

What should I do on the client side in order to punch a hole so that I can receive datagrams from the server?

有帮助吗?

解决方案

you have to design your client in following way
1. Client Should be able to connect to Server and request the IP and Port of other client.
2. Once each client gets Ip port of each other should start onnection with each other. folow the article in the given link. http://www.brynosaurus.com/pub/net/p2pnat/

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top