File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Sockets and Internet Protocols and the fly likes Unexpected SocketTimeoutException Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "Unexpected SocketTimeoutException" Watch "Unexpected SocketTimeoutException" New topic

Unexpected SocketTimeoutException

Sun LiWei
Ranch Hand

Joined: Aug 10, 2002
Posts: 49
I have a thread which using DatagramSocket in the run() method:
MyThread extends Thread{
public void run(){
DatagramSocket socket=new DatagramSocket();
}catch(Exception e){
When I generate tens of threads with MyThread, most of the threads run without exception,but there're always some threads throw a SocketTimeoutException,the network is ok though,when i run one thread a time,no exception! I can't figure it out.Help me.
I agree. Here's the link:
subject: Unexpected SocketTimeoutException
It's not a secret anymore!