I686 Linux system

Tested versions: libcurl/7.21.6 and libcurl/7.21.2

I am creating up to 4 concurrent threads of Easy Interface calls each of which 
are setup within their own thread as:

  myTracker->curl = curl_easy_init();
  if(myTracker->curl)
  {
    curl_easy_setopt(myTracker->curl, CURLOPT_URL,(void 
*)myTracker->inUri.c_str());
    curl_easy_setopt(myTracker->curl, CURLOPT_RESUME_FROM_LARGE, 
(curl_off_t)myTracker->currentSize);
    curl_easy_setopt(myTracker->curl, CURLOPT_WRITEFUNCTION, 
&writeMemoryCallback);
    curl_easy_setopt(myTracker->curl, CURLOPT_WRITEDATA, (void *)myTracker);
    curl_easy_setopt(myTracker->curl, CURLOPT_USERAGENT, "libcurl-agent/1.0");
    curl_easy_setopt(myTracker->curl, CURLOPT_NOBODY,0L);
    curl_easy_setopt(myTracker->curl, CURLOPT_HEADER,0L);
    curl_easy_setopt(myTracker->curl, CURLOPT_FOLLOWLOCATION,1L);
    curl_easy_setopt(myTracker->curl, CURLOPT_CONNECTTIMEOUT, 10L);
    if( myTracker->currentBandwidth )
    {
     curl_easy_setopt(myTracker->curl, CURLOPT_MAX_RECV_SPEED_LARGE, 
myTracker->currentBandwidth);
     curl_easy_setopt(myTracker->curl, CURLOPT_MAX_SEND_SPEED_LARGE, 
myTracker->currentBandwidth);
    }
    curl_easy_setopt(myTracker->curl, CURLOPT_ERRORBUFFER, curlErrorInfo);
    curl_easy_setopt(myTracker->curl, CURLOPT_NOPROGRESS, 1L);
    myTracker->copyStartTime = time(NULL);
    myTracker->lastCopyTime = myTracker->copyStartTime;
    res = curl_easy_perform(myTracker->curl);
}


The thread that creates up to 4 of the above Easy Interface threads has the
curl_global_init(CURL_GLOBAL_ALL);
before any of the Easy Interface Threads are called.

I am only downloading, using protocols FTP, HTTP, TFTP, and FILE.  I am using 
IIS under windows 7 as the test HTTP and FTP server.  All concurrent requests 
go to this server for different files.  When I use http as the protocol, my 
callback function, writeMemoryCallback is being called for every thread up to 
the max 4 all the time.  When I use ftp as the protocol, only the first two 
threads use the writeMemoryCallback function during the transfer.  The other 
two ftp threads are downloading the file but never call the callback function 
until the file has been totally transferred.  This makes it impossible to 
report status on any ftp download > 2.




Dan Kable

[email protected]
work: (317) 587 4162
[cid:[email protected]]
101 W. 103rd St.
Indianapolis, IN 46290

<<inline: image001.png>>

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html

Reply via email to