cURL / Mailing Lists / curl-library / Single Mail

curl-library

Curl_multi_perform problem

From: Milan KÝŠpek <Hellbard_at_seznam.cz>
Date: Wed, 02 May 2007 12:54:04 +0200 (CEST)

Hi, I have two problems.

 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.

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}}}

When I try to add some header to the first data element, it works. Why? Is there any mistake in curl_slist_append or I use it wrong way?

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?

thanks for any response and please sorry my english.
Received on 2007-05-02