cURL / Mailing Lists / curl-library / Single Mail

curl-library

Using libcurl's proxy option seems strange,why?

From: jun <hzhijun_at_huawei.com>
Date: Thu, 21 Jul 2005 16:12:20 +0800

Hi
   My application is a multi-threaded program, using 10 threads by
default to send message to web server.
   Each thread using a seperate curl handle,so I always use
curl_easy_setopt() functions before perform.
 
Now the situation is I want my application to send msg to web server via
a proxy. So I add the following sentense to
my source code.
 
/*using none auth*/
curl_easy_setopt(LOC_H_curl, CURLOPT_PROXYAUTH, CURLAUTH_NONE);
curl_easy_setopt(LOC_H_curl, CURLOPT_PROXY,
LOC_H_Proxyrecord.server_addr);
 
 
/*or using basic auth*/
curl_easy_setopt(LOC_H_curl, CURLOPT_PROXYAUTH, CURLAUTH_BASIC);
curl_easy_setopt(LOC_H_curl, CURLOPT_PROXYUSERPWD, LOC_H_ProxyUser);
curl_easy_setopt(LOC_H_curl, CURLOPT_PROXY,
LOC_H_Proxyrecord.server_addr);
 
 
test record:
 
without using proxy: my app can successfully send and recv 10K messages
(200 msg per second)
with using proxy: my app perform very unsatisfied:
 
total msg success failed
4msg/sec 1002 997 5
10msg/sec 1000 998 2
50msg/sec 1000 860~980 20~140
 
The above test record are using proxy software: WinProxy. If we replace
the proxy software with Wingate,
or Proxomitron, it seems similar. No matter how slow I send msg, it
can't be 100% success.
 
When failed , the mainly result code of curl is 7(could not connect),
sometime is 28(operation timeout).
 
 
 
Why? Are these anything wrong that I use curl' s option? What's the
cause of this problem?
 
Is it the proxy software's restriction or curl's problem?
 
Any suggestions? Thanks!!!
 
 
 
Regards
Jun
Received on 2005-07-21