Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

DatagramSocket.receive(DatagramPacket)  RSS feed

sai challa
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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).]
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!