diff options
author | Daniel Stenberg <daniel@haxx.se> | 2006-06-22 21:36:53 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2006-06-22 21:36:53 +0000 |
commit | dfe1884c2529d728750d0824f73055627673cd72 (patch) | |
tree | 4f6d30648e54d10f10401408f0f819ff344ce318 /lib/url.c | |
parent | 3e5dcc8bcd4aaa7b6d7f8432327cbdd5487113e4 (diff) |
Peter Silva introduced CURLOPT_MAX_SEND_SPEED_LARGE and
CURLOPT_MAX_RECV_SPEED_LARGE that limit tha maximum rate libcurl is allowed
to send or receive data. This kind of adds the the command line tool's
option --limit-rate to the library.
The rate limiting logic in the curl app is now removed and is instead
provided by libcurl itself. Transfer rate limiting will now also work for -d
and -F, which it didn't before.
Diffstat (limited to 'lib/url.c')
-rw-r--r-- | lib/url.c | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -1039,6 +1039,22 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option, */ data->set.low_speed_limit=va_arg(param, long); break; + case CURLOPT_MAX_SEND_SPEED_LARGE: + /* + * The max speed limit that sends transfer more than + * CURLOPT_MAX_SEND_PER_SECOND bytes per second the transfer is + * throttled.. + */ + data->set.max_send_speed=va_arg(param, curl_off_t); + break; + case CURLOPT_MAX_RECV_SPEED_LARGE: + /* + * The max speed limit that sends transfer more than + * CURLOPT_MAX_RECV_PER_SECOND bytes per second the transfer is + * throttled.. + */ + data->set.max_recv_speed=va_arg(param, curl_off_t); + break; case CURLOPT_LOW_SPEED_TIME: /* * The low speed time that if transfers are below the set |