curl-library
Re: How to make curl_easy_perform return immediately
Date: Thu, 22 Nov 2007 21:47:49 -0800
you can put the curl_easy_perform in another thread too if you like
the interface better (:
sounds retarded but i did that and it seems to work well
On Nov 22, 2007 9:30 PM, Bruce Peng <promagian_at_gmail.com> wrote:
> Thanks very much! I'll try muti interface.
>
> GOOD LUCK
>
>
> 2007/11/22, Daniel Stenberg <daniel_at_haxx.se>:
> >
> > On Thu, 22 Nov 2007, Bruce Peng wrote:
> >
> > > When i download file (HTTP) using libcurl, sometimes, it just wait there
> and
> > > no data received. So, i want make curl_easy_perform return immediately,
> can
> > > somebody tell me how? thanks
> >
> > curl_easy_perform() does the request in a fully synchronous manner and it
> > returns when the entire operation is done. That _can_ be very quick but it
> can
> > also be very slow. There's nothing you or libcurl can do about that.
> >
> > You can use a timeout to stop slow operations, or you can switch to the
> multi
> > interface which is non-blocking and thus all (at least most) function
> calls
> > return very quickly.
> >
> > --
> > Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
> >
>
>
>
> -- Bruce Peng
> Kingsoft Corp. ZhuHai. China.
> msn:promagian_at_hotmail.com
> email:promagian_at_gmail.com
Received on 2007-11-23