hi everyone
i have a server using windows sockets and runs on multiple computers on lan,
and i need to display a list of the servers from a client machine,
what is the easy way ,how can i implement it
Printable View
hi everyone
i have a server using windows sockets and runs on multiple computers on lan,
and i need to display a list of the servers from a client machine,
what is the easy way ,how can i implement it
There's essentially two solutions that I've seen to this problem:
1) Use some form of a broadcast, sending the same message to every computer on the network. A sort of Client: "Are you there?" Servers: "Yeah, I'm at *ip address*" I think UDP is capable of this. There are probably other ways as well... searching the forum, these might help you:
Finding a server, Howto Broadcast?.
2) Maintain some central list at a known location, have all servers send a "Hey, I'm here!" message to the central list, which then stores it. When a client wants a list of servers, it simply consults this central list.
Solution two works well for servers spread across the internet. Solution one is probably better suited for LANs. I've never personally implemented either - Google is your friend. The above topics I linked to also mention multicasts, perhaps another solution.