cURL / Mailing Lists / curl-library / Single Mail

curl-library

Blocking operations in curl multi?

From: Martin C. Martin <martin_at_metahuman.org>
Date: Wed, 16 Apr 2003 09:05:40 -0400

Hi,

I'm using curl's multi interface to keep my app responsive without having
to spawn another thread. So, I never want my call to curl_multi_perform
to take very long, i.e. I always want it non-blocking. Unfortunately, DNS
resolution is blocking (as, I think, it has to be without spawning a
thread itself). Well, I can do the DNS resolution myself and hand curl a
URL with numbers in place of the domain name. But are there any other
blocking operations in there? When it initiates a connection, does it
wait until that either succeeds or fails before returning? Are there any
other operations that might take more than, say, 50 msec (assuming only a
modest amount of data. I'm doing streaming audio.)

Any chance of DNS resolution being done non-blocking? This would probably
involve curl_multi_perform() spawning a thread to do the actual DNS
resolution, which would be OS specific, but that's not the end of the
world...

Thanks,
Martin

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
Received on 2003-04-16