1
0
mirror of https://github.com/moparisthebest/wget synced 2024-07-03 16:38:41 -04:00

[svn] Doc update.

This commit is contained in:
hniksic 2003-09-22 06:34:55 -07:00
parent bebad75ff9
commit b8fa2039a7
2 changed files with 6 additions and 3 deletions

View File

@ -179,7 +179,8 @@ connect_to_one (ip_address *addr, unsigned short port, int silent)
#ifdef SO_RCVBUF #ifdef SO_RCVBUF
/* For very small rate limits, set the buffer size (and hence, /* For very small rate limits, set the buffer size (and hence,
hopefully, the size of the kernel window) to the size of the hopefully, the size of the kernel window) to the size of the
limit. */ limit. That way we don't sleep for more than 1s between network
reads. */
if (opt.limit_rate && opt.limit_rate < 8192) if (opt.limit_rate && opt.limit_rate < 8192)
{ {
int bufsize = opt.limit_rate; int bufsize = opt.limit_rate;

View File

@ -194,8 +194,10 @@ get_contents (int fd, FILE *fp, long *len, long restval, long expected,
limit_bandwidth_reset (); limit_bandwidth_reset ();
wtimer_reset (timer); wtimer_reset (timer);
/* If we're limiting the download, set our buffer size to the /* Use a smaller buffer for low requested bandwidths. For example,
limit. */ with --limit-rate=2k, it doesn't make sense to slurp in 16K of
data and then sleep for 8s. With buffer size equal to the limit,
we never have to sleep for more than one second. */
if (opt.limit_rate && opt.limit_rate < dlbufsize) if (opt.limit_rate && opt.limit_rate < dlbufsize)
dlbufsize = opt.limit_rate; dlbufsize = opt.limit_rate;