cURL / Mailing Lists / curl-library / Single Mail

curl-library

calling "multi-single.c" example in an endless loop?

From: Sven Geggus <lists_at_fuchsschwanzdomain.de>
Date: Fri, 15 Mar 2013 14:36:39 +0100

Hello,

starting from the multi-single.c example I try to convert this to something
like this:

curl_easy_setopt(http_handle, CURLOPT_URL, "my-url");
while (1) {
  ..
  rest of example code
  ..
}

Unfortunately I did not get this to work without also calling
curl_multi_init/curl_multi_cleanup inside the loop. This leeds to a
permanent reonnection of the tcp socket.

However, it works fine using the simple-interface (without socket
reconnection).

The reason I need to use the multi-interface is that I also want to add my
own file descriptors to the select loop to occasionaly do something else
while URL fetching (one url at a time, but always the same one) is still in
progress.

Sven

P.S.: This might look strange, but the url I'm about to fetch will delay on
the server side doing some kind of pseudo push mechanism, so this will not
kill the server.

-- 
The source code is not comprehensible
                 (found in bug section of man 8 telnetd on Redhat Linux)
/me is giggls@ircnet, http://sven.gegg.us/ on the Web
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2013-03-15