Scanning for local LAN games
If I were to add a feature to my game to scan for local LAN servers of my game, should I have it looking though 192.168.0.0 and upwards, testing for the server listen port? Is there an easier way to do this?
Yes, use the UDP broadcasting feature. When you want to find games, broadcast a packet to the port your server listens on. When you recieve this message as a server, send a response back with the info you want to include like player slots available, game type, things of that nature.
Taking your original route would also require you to test 10.x.x.x, quite a few combinations!
Taking your original route would also require you to test 10.x.x.x, quite a few combinations!
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement