1
Network / UDP socket connection over WAN
« on: October 23, 2018, 09:29:12 pm »
Hello,
I’ve been working on an online game for around a month and a half now, and I have made a lot of progress. I have a whole system in place for connecting different machines over LAN, sending packets full of player data to the server and then sending all the data to other players, and all the other basics of online games. I thought it was impossible to connect UDP sockets over WAN without some form of NAT traversal, like UDP hole punching, but I was looking through some tutorials and I found out this might not be the case.
How exactly would this work in SFML, and what would I need to do this? Would I need hole punching after all? Has somebody already done this, and is there any source code for something like this?
I’ve been working on an online game for around a month and a half now, and I have made a lot of progress. I have a whole system in place for connecting different machines over LAN, sending packets full of player data to the server and then sending all the data to other players, and all the other basics of online games. I thought it was impossible to connect UDP sockets over WAN without some form of NAT traversal, like UDP hole punching, but I was looking through some tutorials and I found out this might not be the case.
How exactly would this work in SFML, and what would I need to do this? Would I need hole punching after all? Has somebody already done this, and is there any source code for something like this?