Hello. Using a
thread i am trying to create a socket. That is
Socket mySocket = new Socket(...); At times socket creation is taking a long time. I wish to put a timer on it. Say if it takes
more than 'n' seconds, i want the thread to terminate. But the thread is blocking on the socket creation and i am finding it difficult to come out of it. For that too i had to use deprecated
stop() method from the main() method to come out.
Are there any more elegant ways of doing it?
Prasad