Let's suppose that I have a basic network with 3 computers connected to each other via Ethernet. Two of those computers wish to host my server program. The third computer wishes to run my client program to connect to one of those hosts. Is there some way to enumerate through any sockets actively listening for clients?

The server program, in pseudocode, is:
Code:
WSAStartup()
WSASocket()
bind()
listen()
while (true) { accept() }
The client program would be (pseudocode):
Code:
WSAStartup()
WSASocket()
se = getServerEnum()
foreach (Server s in se) { print(s.id) }
us = getUserSelection()
connect(us)
So basically I'm looking for something to plug in for my hypothetical getServerEnum() function.
Is there such a thing, or do you just connect to whomever happens to be listening?

Thanks in advance,
-IsmAvatar