• Advertisement

Archived

This topic is now archived and is closed to further replies.

Finding the computers on your network

This topic is 5777 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

Hi, I was wondering how I would go about getting a list of all the computers on my network. This way I can check to see if any of them is hosting a game without needing a central server. Also, I''m using Java for this, so could you either give Java code or give the general method of doing this (and hopefully I can convert that to Java). Thanks

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
Im looking for the same thing as him except in C/C++ (the altter preferably) if anyone can help us ;-)

Share this post


Link to post
Share on other sites
Im looking for the same thing as him except in C/C++ (the altter preferably) if anyone can help us ;-)

Share this post


Link to post
Share on other sites
try looking into UDP broadcasting over a LAN. i don''t know much about it but involves sending a UDP messages to a mask instead of a single IP address, i think then you could just get a list of the IP addresses which reply to the broadcast and query them for game info

Share this post


Link to post
Share on other sites
Thanks for hint Zanthos. I think that I''ve found a solution. If anyone wants to see it, there''s a tutorial at http://java.sun.com/docs/books/tutorial/networking/datagrams/index.html. I''m not sure if this will help you out Aselus, but you might want to check it out (even though it is Java) since you might be able to apply the principle to C++.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
If i remember correctly, you send a (broadcast) udp datagram to the network address of your subnet. The network address of the subnet is *.*.*.0 where the *''s are your normal network addresses. For instance, if the computers on your network had addresses like 10.10.10.1, 10.10.10.2 etc. you would send to 10.10.10.0 . It''s either that or networks have a broadcast address on *.*.*.255 ... can''t remember which sorry!!!

Share this post


Link to post
Share on other sites

  • Advertisement