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!

network programing

Status
Not open for further replies.

A1METALHEAD

Programmer
May 21, 2004
76
US
hello. is there anyway to look for all the servers on a network? for example: i have a server peorgram and a client program. can i have many different servers listing on the same network (and i dont know there IPs) and have a client (on the same network) find all of them without having all there IPs? im trying to give a game a multiplyer over lan feture.
thanks!
~metalhead
 
First thing you do is send out some kind of inquiry using the broadcast address. Anything which is up and running can then reply to the originator.
The originator will get 0 or more replies, each containing the source address of an active machine.

--
 
(i dont have acsess to a compiler now)

so, if i connect and send a messege to 192.168.1.255 than it will trasmit it to all the programs on that port?
 
uh. my it still dosent work. it pauses on:
theSocket = startupClient(1234, "192.168.1.0");
but, after like 5 seconds it just returns a SOCKET_ERROR
 
You're going to have to post more code than that if you want anything like a reasonable answer


--
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top