Finding games over a LAN via WinSock
In my multiplayer game I have it working fine if you enter the IP of the server but DirectPlay has the ability to ''search for local games'' in TCP/IP over a LAN. Does anyone know how to accomplish this with WinSock 2.x?
Just create a socket to listen to the broadcast address for the subnet that the computer is on. Then the game server sends packets to the broadcast address.
The client broadcasts a UDP packet and then the server responds. We don''t want the server wasting network bandwidth broadcasting continuously if there are not clients interested in connecting.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement