How do games (such as Halo) scan the network to see if there are any LAN servers?
In Halo 1 for PC, you could open Multi开发者_如何学运维player and search for locally hosted servers. In many other modern games you can do this too. How is this possible?
It's likely these games:
- Send broadcasts ("is anyone out there?") and wait for answers
- Send multicasts and wait for answers (see above)
- Wait for others to shout ("Hey, I'm a server") via broadcasts / multicast
Broadcasts and multicasts are propagated in the entire local network.
In simple terms, they broadcast a message over LAN. Locally hosted servers respond with an "I'm an available server!" message. Computers that are not running instances of the game server simply ignore the request.
精彩评论