Date: Tue, 14 Jan 2003 13:17:24 +0100 (MET)
On Tue, 14 Jan 2003, Konstantin Filatov wrote:
> 1. How can I get info about socket connection (ip, port etc.) during the
> transfer (downloading)? For example, in write_callback.
You cannot. We have no such interface today.
If it would to be introduced, I figure curl_easy_getinfo() is a suitable
place to extend with some more informationals.
> 2. Can I reset timeouts CURLOPT_TIMEOUT and CURLOPT_CONNECTTIMEOUT in new
> value on the fly? For example, in write_callback or progress_callback.
No. The settings that were set when you did curl_easy_perform() may not be
changed during transfer. Or rather, I prefer to say so and in fact many
settings won't change even if you change them while transferring while some
will change immediately. I just don't want to encourage this usage as I don't
want to code the library to always stay resistant to all values being able to
change any time.
> 3. It is not clear for me from documentation: can I use these timeouts in a
> stable way in my multithread application (with CURLOPT_NOSIGNAL)? If it is
> not recommended then libcurl is useless for me :(
Yes you can use them if you set CURLOPT_NOSIGNAL.
> 4. Has libcurl handle pthread-cancellation to abort a thread within curllib?
libcurl has no knowledge of pthread or any other threading API.
What exactly are you asking for?
> Since curl_perform is a long-time functiion, it is need.
The only long-time block is when it does the name lookup, and having
"pthread-cancellation" won't help you much there, AFAICT. In all other cases
you can make the callback abort the transfer when you think it has been going
on for too long.
> I see a way now: progress_callback can return non-zero value if the
> cancellation is required. Is it a right way?
That's a good way, yes.
Please keep in mind that libcurl is open source. We depend on people to
contribute, to cough up ideas, to file bug reports and to write source code.
-- Daniel Stenberg -- curl, cURL, Curl, CURL. Groks URLs. ------------------------------------------------------- This SF.NET email is sponsored by: FREE SSL Guide from Thawte are you planning your Web Server Security? Click here to get a FREE Thawte SSL guide and find the answers to all your SSL security issues. http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0026enReceived on 2003-01-14