cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: multi interface + writeDataCallback doesn't work on win32 !

From: Stefan Libcurl <libcurl_at_hotmail.com>
Date: Mon, 24 May 2004 16:58:50 +0200

Hi !

I have set following:

  curl_easy_setopt(curl1, CURLOPT_DEBUGFUNCTION, curl_debug_callback);
  curl_easy_setopt(curl1, CURLOPT_DEBUGDATA, (void *)ctrlInstance);
  curl_easy_setopt(curl1, CURLOPT_VERBOSE, TRUE);

ctrlInstance is an object to print out infos.

But curl_debug_callback() is never called (like writeDataCallback()).

I just looked into docs about select() and fd_set. But I have nothing found.
Puhh, when I look into the examples I don't understand what
curl_multi_fdset() and select() do.

Could you give me a short lesson ? Also all examples with multi-interface
have no writeDataCallback(). Is it actually possible to write a data
callback with muti-interface ??

Thanks ...

-stefan

>From: Daniel Stenberg <daniel-curl_at_haxx.se>
>
> > use multi handles the writeDataCallback() is not called. I set a
>breakpoint
> > inside writeDataCallback() but the debugger doesn't stop there (maybe
>the
> > multi interface is threaded).
>
>libcurl uses only the thread you create.
>
>Enable VERBOSE and see that you actually are getting data back.
>
>Besides, your loop terminates much to premature. You should use select() in
>there as docs and examples show, that loop will only run while libcurl has
>data immediately without waiting.
>
>--
> Daniel Stenberg -- http://curl.haxx.se -- http://daniel.haxx.se
> Dedicated custom curl help for hire: http://haxx.se/curl.html

_________________________________________________________________
Wußten Sie, daß Sie Ihren Hotmail-Posteingang auch über den MSN Messenger
abrufen können? http://www.msn.de/messenger Jetzt kostenlos downloaden und
einfach testen!
Received on 2004-05-24