cURL / Mailing Lists / curl-library / Single Mail

curl-library

MacOSX router problems

From: Simon Clark <simon_at_digitalfrog.com>
Date: Fri, 7 Nov 2003 13:56:56 -0500

I am using libcurl to access an apache server on our local network. We
have a router set up to access the internet. If the router is
specified in the system preferences, the performance is abysmal. If I
remove the router from the system preferences, performance is great.

This is output from Console (Mac OS X 10.2.8):

With router set:
   % Total % Received % Xferd Average Speed Time
  Curr.
                                  Dload Upload Total Current Left
  Speed
   1 83879 1 1203 0 0 215 0 0:06:28 0:00:05
0:06:23 0
100 83879 100 83879 0 0 15036 0 0:00:05 0:00:05
0:00:00 82676

With router removed:
   % Total % Received % Xferd Average Speed Time
  Curr.
                                  Dload Upload Total Current Left
  Speed
   8 13520 8 1205 0 0 1978 0 0:00:06 0:00:00
0:00:06 0
100 13520 100 13520 0 0 22145 0 0:00:00 0:00:00
0:00:00 12315
ces, t

With the router set, the total time for the download goes from 0:06 to
6:28.

I suspect it is something in my code, since the router setting does not
affect Safari or IE when accessing the apache server.

curl = curl_easy_init();
if (curl) {
        aMemoryBufferStuff.handle = NewEmptyHandle();
        curl_easy_setopt(curl, CURLOPT_URL, aURL);
        curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, WriteBufferDataProc);
        curl_easy_setopt(curl, CURLOPT_FILE, &aMemoryBufferStuff);
        curl_easy_setopt(curl, CURLOPT_VERBOSE, TRUE); // Debug output
        res = curl_easy_perform(curl);
        curl_easy_cleanup(curl);
}

Any help is appreciated.

Simon Clark

-------------------------------------------------------
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/
Received on 2003-11-07