Jump to content
  • Advertisement
Sign in to follow this  
matt_j

Scanning for local LAN games

This topic is 5060 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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?

Share this post


Link to post
Share on other sites
Advertisement
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!

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!