IP search and things of that general Nature
im currently working on a program in Java using two clients and a server. i want the client to search for an ip address that is running the server, and then try to connect to that address. ive got the clients connecting to a fixed ip address, but i dont know where to begin when it gets to the search part. can someone point me to a tutorial or give me base knowledge? thanks for any help
-LadaYadaYo
Oop! Eek! Eek! Chee!
That depends what you mean by "searching for an IP address which is running the server". Obviously it''s rather impractical to search through every possible Internet IP address to see whether any computer is running your server! If your program will only be running on the local network, you can have your client send a broadcast packet to everyone, and then have the server respond. There should be plenty of references around for broadcasting packets, try searching Google.
If the program will be used on the Internet, and don''t want the clients to have to type in an IP address, you will still need to specify some point to connect to. The best you could do is have clients connect to a master server at a specific IP that indexes all the servers running your program. If your problem is that it''s possible for the server to change IP, you could map to a specific DNS name instead.
If the program will be used on the Internet, and don''t want the clients to have to type in an IP address, you will still need to specify some point to connect to. The best you could do is have clients connect to a master server at a specific IP that indexes all the servers running your program. If your problem is that it''s possible for the server to change IP, you could map to a specific DNS name instead.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement