commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christian Hufgard" <christian.hufg...@gmx.de>
Subject Re: [NET] ftp connection timeout
Date Wed, 27 Sep 2006 14:13:20 GMT
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" <jbisotti@gmail.com>
An: "Jakarta Commons Users List" <commons-user@jakarta.apache.org>
Betreff: Re: [NET] ftp connection timeout

> On 9/18/06, E. Dominguez <e.dominguez@ticino.com> 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: commons-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: commons-user-help@jakarta.apache.org
> >
> >
> 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: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message