commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jamie Bisotti" <jbiso...@gmail.com>
Subject Re: [NET] ftp connection timeout
Date Wed, 27 Sep 2006 13:14:45 GMT
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

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message