Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Detecting Servers...

Status
Not open for further replies.

Rhaegar

Programmer
Sep 28, 2002
19
US
Hello,

I'm writing a client using winsock that needs to be able to detect or locate a server (writing this one too) running on the same LAN. The client will not know in advance what the server's IP is and does not prompt the user for this information. Does anybody know how I can go about doing this? Thank you for your replies, their most appreciated :)
 
How about a central server (with a well-known IP-Address) that will collect adresses of started servers.

That is :
All servers report to the central server when they start/stop.
All clients ask the central server which server(s) are available.

I think WINS works like this.

/JOlesen
 
Thanks for the speedy reply :) Sounds like a good approach, I will definately give it some consideration. Might know of another way but I don't know if it would even be feasible and how to go about implementing it. I was thinking that maybe the client could go through an enumeration process to find a server. Like, if it knew its IP address (easily obtainable) and subnet mask, it could then scan the LAN for a server by trying every possible IP value. This wouldn't take that long in a class C network or atleast I don't think it would...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top