JDK-4031565 : Timeout on Socket()
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: java.net
  • Affected Version: 1.1
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: solaris_2.5.1
  • CPU: sparc
  • Submitted: 1997-02-11
  • Updated: 1997-08-26
  • Resolved: 1997-08-26
Related Reports
Duplicate :  
Description

Name: mc57594			Date: 02/11/97


It would be really great if I could set a timeout on the 
Socket(host, port) call.  As it is now, I have no way of 
interrupting a thread that is hung in a Socket() call.  Maybe
something like Socket(host,port,timeout).

Thanks,
   Vince Tkac
   ###@###.###
company  -  OCLC  , email  -  ###@###.###
======================================================================

Comments
WORK AROUND Name: mc57594 Date: 02/11/97 Have the thread doing the Socket() call controlled by a master thread that will stop() and destroy() it if it goes beyond a certain timeout. This requires the master thread to poll the thread calling Socket(). ======================================================================
11-06-2004

EVALUATION You can already timeout on read. To timeout on write, this is a duplicate of 4031100. benjamin.renaud@Eng 1997-08-26
26-08-1997