From 566289ea9d890f6eabf4ba74dbbbb392835cdd67 Mon Sep 17 00:00:00 2001 From: hniksic Date: Mon, 22 Sep 2003 06:55:22 -0700 Subject: [PATCH] [svn] Added comment about SO_SNDBUF for post. --- src/connect.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/connect.c b/src/connect.c index 8b8620da..483d4c54 100644 --- a/src/connect.c +++ b/src/connect.c @@ -176,7 +176,6 @@ connect_to_one (ip_address *addr, unsigned short port, int silent) if (sock < 0) goto out; -#ifdef SO_RCVBUF /* For very small rate limits, set the buffer size (and hence, hopefully, the size of the kernel window) to the size of the limit. That way we don't sleep for more than 1s between network @@ -186,10 +185,13 @@ connect_to_one (ip_address *addr, unsigned short port, int silent) int bufsize = opt.limit_rate; if (bufsize < 512) bufsize = 512; +#ifdef SO_RCVBUF setsockopt (sock, SOL_SOCKET, SO_RCVBUF, (char *)&bufsize, sizeof (bufsize)); - } #endif + /* When we add opt.limit_rate support for writing, as with + `--post-file', also set SO_SNDBUF here. */ + } resolve_bind_address (); if (bind_address_resolved)