curl-library
Re: Curl_multi_perform problem
Date: Wed, 2 May 2007 13:19:40 +0200 (CEST)
On Wed, 2 May 2007, Milan K?ápek wrote:
> I am working on HTTP client, that will post information to server in
> headers. It must be multithreaded and I must send information to few servers
> in one time. So I decided to use curl_multi_handle.
Note that multi in the libcurl multi interface is short for multiple
transfers, not multiple threads. That interface is in fact designed to be used
in one thread.
> First problem occurs, when I try to add headers. I made new curl_slist and
> add headers in it. But when I executed my aplication it fall, because in
> curl_slist was the first pointer to data NULL. e.g {data = NULL
> nextData = { data = firstHeader:value
> nextData = {data = secondHeader:value
> nextData = NULL}}}
Can you provide an example code showing what you do to make this happen? The
slist functions have existed and worked unmodified for numerous years by
now...
> Second problem is more serious. When I have my aplication with
> curl_easy_handle, it works. When I change it to curl_multi_handle, it works
> to. But when I start new thread and I call curl_multi_perform it does not
> work. I cannot find any error. Maybe it is ecause I do initialiyation of
> curl_multi_handle in one thread and then I just use this instance in new
> thread?
Well, if you would tell us what you do, what happens, what you expected to
happen and what libcurl version on what operating system you use and
everything else you think is relevant we might be able to help!
-- Commercial curl and libcurl Technical Support: http://haxx.se/curl.htmlReceived on 2007-05-02