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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Datagram Socket Problem

Status
Not open for further replies.

Pro79

Programmer
Dec 11, 2003
24
IN
hi to All,
I am facing some problem when i am broadcasting a data packet by using the datagram socket in java

I am using the IP Address 255.255.255.255 to broadcast a packet . The Packet is send , but the programs goes in Indefinite till when receiving a Message from the Machines that are connected in the Local Network !!!!!!!!!!!

Actually , i wana to collect all the Machines IP Address by sending a Broadcast Packet(by using UDP) . Can i body tell whts the Solution of this probelm , so that i retrieve the IP Address of the Machines that are connected in a local Network


 
You're adressing 4 Billion adresses that way!
If your network is 188.12.0.0, broadcast to 188.12.255.255.

Do I understand right - your program hangs until it get's an respond?
Code:
DatagramSocket.setSoTimeout(int timeout)
          Enable/disable SO_TIMEOUT with the specified timeout, in milliseconds.
could help.

seeking a job as java-programmer in Berlin:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top