Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

regarding time outs

 
Abhishek Dhama
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
This question might sound little strange, but then kindly bear with it.
I have this doubt regarding JDK1.1.8!!!
java.net package in JDK1.1.8 doesnt have SocketTimeoutException it has
only SocketException. So how to catch exception which is raised when
socket times out? There is one more exception listed in API
ProtocolException. Now what is the difference between the events which
raise these exception coz API says same thing about both
>>Thrown to indicate that there is an error in the underlying protocol,
such as a TCP error. <<
Also SocketTimeoutException is inherited from
java.io.InterruptedIOException, so will it be a good idea to catch
InterruptedIOException to signal timeout??
Thanking in advance
regds
Dhama
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic