I'm working on a multiplayer internet game. I decided to use UDP protocol, as it's faster than TCP.
The problem is that UDP doesn't have an established server-client connection which makes it impossible for me to send data from server (with public ip) to a client (with non-public ip).
Using TCP I was easy, the client asked the server for a connection, than the server accepted it and data could be sent both sides. (the sever somehow was able to trace the client)
I have no idea how to get the same effect with UDP, although I read that udp is most suitable for network games.
To be more precise I'm using SFML network library, as I'm planing to write the game with it. Here is the documentation of the UDP socket:
Do you have any ideas how to solve the problem?