cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Mulit Interface is not working with proxy

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Wed, 2 Apr 2008 16:40:39 +0200 (CEST)

On Wed, 2 Apr 2008, penugonda chenna reddy wrote:

> The below code is working fine without proxy. If I enable proxy code by
> Uncoomenting the proxy setopts code The code is failing to connect to proxy.
> I am using curl 7.18.0 version.

Test case 547 is very similar to your description, and it works fine...

So exactly how does it fail?

> static size_t read_callback(void *ptr, size_t size, size_t nmemb, void
> *userp)
> {
> memcpy(ptr,buffer,length);
> return length;
> }

This seems to be wrong. Does it always copy the same data and size?

> size_t sicfwrite(void* data,size_t len)
> {
> buffer = data;
> length = len;
> int handles;
> while(CURLM_CALL_MULTI_PERFORM ==
> curl_multi_perform(handler, &handles));
> return len;

This seems a bit ineffective. I'd say you want to return status to the caller
when one or more transfers are done.

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
Received on 2008-04-02