I'm currently developing an online game. Within the game it is necessary to send data from the server to the clients via TCP and UDP. Implementing UDP-Hole Punching is easy, but I'm not really sure how to implement TCP-hole punching:
Is 3. or 4. the right way to go?
Option 3.
Option 4 does not work because once the client closes the socket BOTH sides shut down. The server would have to initiate the connection across the NAT firewall, which clearly doesn't work.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.