Sunday 15 July 2012

networking - How to discover other devices on a network programmatically? -


Imagine that you are developing a multiplayer game and want to host a game. In other players of the same local network, open games can be discovered and included.

How can this programmatically be achieved?

Here's what I have considered: 1) Scan local IP address and port (not possible with IPv6) 2) Provide IP-ad host and give input to users (Consumers' Not good for)

How is such a task done in general? Is it where the multicastes come in play? I am looking for a solution that can work for both IPv6 and IPv4. Port scanning is not just good.

Thanks in advance.

For one IPv4 after one, you can send a broadcast message to the broadcast address

2) For IPv6, you can send a multicast message.

Router does not have to block UDP packets.


No comments:

Post a Comment