Note that there are some explanatory texts on larger screens.

plurals
  1. POUDP Hole Punching help
    primarykey
    data
    text
    <p>I'm trying to add networking over the internet to my game, using Peer to Peer. I have already implemented a LAN only version, which uses .NET's peer to peer classes to connect within the local network.</p> <p>I realized I need to use UDP hole punching in order to establish a connection to other clients that are behind a firewall.</p> <p>This is how I have started to implement it: The server is a HTTP server using very simple PHP scripts to get the job done.</p> <ol> <li><ul> <li>register name on server, sending the private ip address and port as a GET variable</li> <li>when the server gets a registration request, it will save the public endpoint and the private endpoint</li> </ul></li> <li><ul> <li>request to connect to another client.</li> <li>the server will return the private and public endpoints of the client</li> <li>every two seconds, the second client will check in with the server, and if there is another client attempting to connect with it, it will get its endpoints too</li> </ul></li> <li><ul> <li>both clients start spamming each others public endpoints until they get a valid response</li> </ul></li> </ol> <p>Now I have a bunch of questions </p> <ol> <li>Can the server be a HTTP server?</li> <li>When I make a request to an HTTP server, the client port changes each time a request is made. Is a private endpoint always matched to the same public endpoint?</li> <li>Does the request to the server have to have the same source endpoint as the UDP messages to the client?</li> <li>Is there a way to connect to an HTTP server in C# using a specified source endpoint?</li> <li>Are there any problems with my implementation?</li> </ol> <p>Thanks!</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload