Is there a way to send messages (packets) to a generic Unity app if you know what their IP is?
I am not looking for a client-to-server setup, but a client-to-client system without having to portforward etc.
I used to achieve this using UDP holepunching, but I was wondering if there are better methods to do this? A plugin perhaps?
Well the problem is you usually don’t know what their IP is. You know what their NAT router’s IP is, which won’t know what to do with the packet unless it already has you in its connection table.
The major approaches are hole punching (as you already mentioned), relay server, dedicated server, and a cloud service. The last 3 are just different variations of both clients connected to some server instead of connected to each other.
Darn. Well, I want to implement a public database of IPs on my website (“active games”), which the client will scan through. Guess it’s back to holepunching then?