What about Socket.setSoTimeout(int timeout)? Should throw a
InterruptedIOException after specified milliseconds on read method.

-- Juergen Sonnauer

Per Widerlund wrote:
> 
> Hello all..
> 
> Consider the following scenario:
> You want to connect to a remote server that may
> or may not be up and running (or even reachable).
> You want to be able to specify the exact amount
> of time before the connection attempt times out.
> You are not allowed to use any of the soon-to-be-
> deprecated (JDK1.2) methods in the Thread class.
> 
> Solution?
> 
> /Per Widerlund

Reply via email to