aspose file tools*
The moose likes Sockets and Internet Protocols and the fly likes DatagramSocket.receive(DatagramPacket) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "DatagramSocket.receive(DatagramPacket)" Watch "DatagramSocket.receive(DatagramPacket)" New topic
Author

DatagramSocket.receive(DatagramPacket)

sai challa
Ranch Hand

Joined: Feb 06, 2001
Posts: 54
If a java client does a timed wait for a UDP msg from the server, by blocking on DatagramSocket.receive(DatagramPacket) and if it times out on couple of tries, then the socket figures out that the Server is down and sets its state such
that the next call to receive() will not block but would rather
straight away give IOException.

After a while if the Server is up, even then the socket is not able to receive any data. This wasn't the case with older JVMs. In older netscape, the Java client(an applet) will be able to resume receiving packets.
Could anybody help me by answering if there is a way to reinitialize the socket that has given up on the server, to start receiving data when the server is up?
[This message has been edited by sai challa (edited June 07, 2001).]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: DatagramSocket.receive(DatagramPacket)
 
Similar Threads
udp packet to tcp packet conversion
UDP DatagramSocket.receive() glitches
Urgently Help/Guidance Required
Network assignment HELP NEEDED
DatagramSocket.receive(...)