Hi, I recently opened a issue on jira for this:
https://issues.apache.org/jira/browse/NET-141 At the moment the only chance is to set a custom SocketFactory. You might use the one attached to the jira issue (if you are using jdk 1.4 or above). In my tests it worked fine. If you have to use a jdk below 1.4 you might take a look into the source of commons-httpclient. There is a Thread-based implementation that works also with jdk below 1.4 Greets, Chris -------- Original-Nachricht -------- Datum: Wed, 27 Sep 2006 09:14:45 -0400 Von: "Jamie Bisotti" <[EMAIL PROTECTED]> An: "Jakarta Commons Users List" <[email protected]> Betreff: Re: [NET] ftp connection timeout > On 9/18/06, E. Dominguez <[EMAIL PROTECTED]> wrote: > > > > Hi all, > > > > how can I set a timeout to an ftp connection? > > > > In my program, if I try to connect to an unavailable ftp server the > > application hangs (better said waits...). > > OS is iSeries's OS400 v5r3 or better. > > > > [code] > > FTPClient client = new FTPClient(); > > client.connect("myhost.com"); > > //application hangs waiting if no server responding... > > client.login("user","password"); > > //(...) > > [/code] > > > > Kind regards > > > > elvisd > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > I don't have the docs in front of me at the moment, but I think there is > another connect() method that takes a connection timeout. > > -- > Jamie Bisotti -- Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
