Jump to content
  • Advertisement
Sign in to follow this  
Pirosan

[java] Accessing networked computers

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

I want to be able to retrieve all of the networked computers connected to the client's computer in order to check for other computers using the same software. I'm looking into Java.net classes, but i'm not sure where to start.

Share this post


Link to post
Share on other sites
Advertisement
I'm not totaly sure what you mean, what is your goal? Finding all computers on the network sounds rather viral. Why do you need to find all computers running your program?

I'm not much of a network programer yet, (Still looking for a good place to start to actually learn an OpenGL binding for Java, not to just copy code from someone else with only half an idea of what it actually does) but sounds like having a small companion program with it would be good. A micro server you run somewhere, when you install/startup your program, have it find the IP of the computer it is on, then connect to the micro server to retreve a list of IPs currently running the program. Server takes the new connection and adds it to the list, have the server slowly cycle through its list to check for dropped connections, and updates clients with the new list.


That sort of thing might work, just an idea from someone with almost no network experience.

But still, just what do you want to do with this information, what sort of program are you trying to make? without that bit of info, there isn't a whole lot people can do to help you find the most effective solution.

Share this post


Link to post
Share on other sites
Perhaps you could have the software sending periodic "pings" to the client system and the ping just hits a counter. I as well am not sure what your intent is. Are you checking for your own software (it could be modified)? Or are you creating your own software?

Share this post


Link to post
Share on other sites
No viral intent here, you need not worry. I'm looking to see if other computers in the immediate network have the same program running. something like a network game lobby, so when the user logs on he or she sees if there are other games being hosted in the network.

Share this post


Link to post
Share on other sites
ah, ok. If this is going to be setup for some sort of LAN, then I suggest you setup a centeral server program. It is installed first, and then everyone that installs it after the server is up and running sets it to connect to that computer running the server. This would be much easier to code up, and less likely to setoff security software than something that goes along, pinging every computer in a network.

Could also be easy to setup such software to run over a wider area.

Share this post


Link to post
Share on other sites
Creating a server would fit my needs certainly, but if i were to give it to someone, they would have to configure their clients to connect to a certain computer the first time. So you don't think there is any way that I could do this without a central server without setting off some kind of alarms? and even if it did, how would i ping each computer?

Share this post


Link to post
Share on other sites
I'm a more visual person. I used this setup in a local LAN tourney. Works great, except I didn't use 9 as the number of computers accessing a server (16)

We tried something new where we had a central hub which was our "control center." It connected to 3 "Nodes" which were the servers to which gamers connected. Therefore, we accessed 1 computer which controlled 3 computers which served 16 ea. Therefore, we had control over 48 computers that accessed the server - through one.

I just did the networking setup; the software part was out of my hands.

Here's the basic idea:
Image Hosted by ImageShack.us

Share this post


Link to post
Share on other sites
As for pinging, its the software on each computer (in my view). It sends a small data file to the central server. Upon reception, the server just creates a "tally" / index of who has the software based on the ping.

Still kind of unclear; is this gaming software?

Share this post


Link to post
Share on other sites
Well concider it a lobby. Its not specifically based on a game, its actually more of an experiment. I want to creat a collaboration program which allows many users to share files or write documents together over networks, even over the internet (but that is not hard, what is hard is the network side).

For my purposes, i just want to know if these programs can just connect to each other without the need of a central server, sort of a peer to peer program.

Also, let me be clear that I also intend for this to be used for a game as well. I want to have each client find a hosted game on the network without having to use the ip.

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!