cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: inactivity timeout on Win2k

From: <RBramante_at_on.com>
Date: Wed, 17 Dec 2003 14:43:18 -0500

On a related note, I decided to try and punt on the LOW_SPEED options and
added a progress callback in hopes to implement the inactivity timeout in
that manner.

Unfortunately, I do not seem to get callbacks at any regular interval. In
the archives it says they are made every second if there is no transfer
activity. I am seeing a delay of over 4 minutes before I get my first
progress callback after pulling the network cable. Subsequent callbacks
with the cable unplugged are coming at sporadic intervals. Here is the
output from my progress callback:

elapsed ms: 0 dltot: 0 dlnow: 3110912 ultot: 0 ulnow: 0
elapsed ms: 261015 dltot: 0 dlnow: 3119104 ultot: 0 ulnow: 0
elapsed ms: 118000 dltot: 0 dlnow: 3119104 ultot: 0 ulnow: 0
elapsed ms: 1000 dltot: 0 dlnow: 3119104 ultot: 0 ulnow: 0
elapsed ms: 144047 dltot: 0 dlnow: 3119104 ultot: 0 ulnow: 0
elapsed ms: 1000 dltot: 0 dlnow: 3119104 ultot: 0 ulnow: 0
elapsed ms: 160000 dltot: 0 dlnow: 3119104 ultot: 0 ulnow: 0
elapsed ms: 30000 dltot: 0 dlnow: 3119104 ultot: 0 ulnow: 0
* Closing connection #0
!!! Error [28] >> Operation too slow. Less than 1 bytes/sec transfered the
last 30 seconds
elapsed ms: 716078

This tranfer took almost 12 minutes to abort after pulling the plug with

curl_easy_setopt(h, CURLOPT_LOW_SPEED_LIMIT, 1L);
curl_easy_setopt(h, CURLOPT_LOW_SPEED_TIME, 30L);

Progress callbacks are varying between 1 second to 4.3 minute intervals.

                                                                           
             RBramante_at_on.com
             Sent by:
             curl-library-admi To
             n_at_lists.sourcefor curl-library_at_lists.sourceforge.net
             ge.net cc
                                                                           
                                                                   Subject
             12/17/2003 12:37 inactivity timeout on Win2k
             PM
                                                                           
                                                                           
             Please respond to
             curl-library_at_list
             s.sourceforge.net
                                                                           
                                                                           

I am trying to implement an "inactivity timeout" for transfers on Win2k.

I am setting:

curl_easy_setopt(h, CURLOPT_LOW_SPEED_LIMIT, 1L);
curl_easy_setopt(h, CURLOPT_LOW_SPEED_TIME, 60L);

Which from the docs I am assuming means: if the transfer rate falls below 1
byte per second for 60 consecutive seconds, abort. (effectively if no bytes
have been received for 60 seconds, correct?)

I start a transfer and then I unplug the network cable about half way
through. That was 10 minutes ago and I am still sitting in
curl_easy_perform with no end in site.

As a test I set the limit to some astronomical number than cannot be
achieved and the transfer did abort with an "operation too slow" message.

After several tries I've had no success with the cable unplugged test
though. Any ideas?

-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills. Sign up for IBM's
Free Linux Tutorials. Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click

-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills. Sign up for IBM's
Free Linux Tutorials. Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
Received on 2003-12-17