curl-library
Re: ftp+multithreaded+timeouts
Date: Mon, 29 Jul 2002 15:47:43 +0200 (MET DST)
On Mon, 29 Jul 2002, Arthur Kluba wrote:
(CC'ed to the libcurl mailing list.)
> Am Sonntag, 28. Juli 2002 19:12 schrieben Sie:
> > On Thu, 11 Jul 2002, Arthur Kluba wrote:
> > > hallo, i'm writing a multi-threaded application and want to use curl for
> > > ftp transfer. i know i can use CURLOPT_LOW_SPEED_LIMIT and
> > > CURLOPT_LOW_SPEED_TIME to control the timeouts durring the transfer but
> > > with them i cant control the connection timeouts. i found this timeout
> > > hardcoded in ftpgetresponse (ftp.c) and it has the value of 60 min. is it
> > > clever to take it out and make it configurable or are there other way to
> > > control connection timeouts.
> >
> > CURLOPT_CONNECTTIMEOUT
> sorry, i think my description of the problem was not so clear, i know
> CURLOPT_CONNECTTIMEOUT but it is only usefull for problem durring
> dns-resolving.
No, it was introduced to offer a timeout to abort slow connections, with
connection being the entire phase until data starts to get transfered.
But, I'm afraid that just because the CONNECTTIMEOUT includes both the DNS
resolve and the TCP connect, you can't use it as you might make it abort the
DNS resolve which can only be done using signals and you don't want signals
when you run multi-threaded...
> my problem is a step after, durring the first communication between libcurl
> and server.you can easy reproduce what i mean, stop your ftp-server(not
> kill,or open a socket that does not answer) and try to get a file or
> directory from it. libcurl waits now for 60 min. until it cancel the
> transfer and there is no way to control this.
How do you suggest we solve this problem? I mean, until we add a DNS resolve
function that can be aborted without signals?
-- Daniel Stenberg -- curl related mails on curl related mailing lists please ------------------------------------------------------- This sf.net email is sponsored by: Dice - The leading online job board for high-tech professionals. Search and apply for tech jobs today! http://seeker.dice.com/seeker.epl?rel_code=31Received on 2002-07-29