An exception throws when I try to make a Socket to 255.255.255.255?

Socket() creates a stream ( TCP ) socket. You can't broadcast a stream. You need a datagram socket ( UDP ), so you should use the more specialized class DatagramSocket() instead.

Socket() creates a stream (TCP) socket. You can't broadcast a stream. You need a datagram socket (UDP), so you should use the more specialized class DatagramSocket() instead.

Thanks for your response. Now I'm using DatagramSocket in a networking program. But again, It fails.

I've asked a new question which you can find it here: stackoverflow. Com/questions/6579350/… . – Pro.

Hessam Jul 5 at 9:15.

I believe that Java TCP sockets only support Unicast communication, where as you want to be using datagram sockets. download.oracle.com/javase/1.4.2/docs/ap....

Trying to connect a TCP Socket to the non-existent IP address 255.255.255.255 (a) is impossible and (b) doesn't send anything anywhere. It isn't the same thing as sending a UDP datagram via a DatagramSocket with a target address of 255.255.255.255, which is what you were advised to do.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions