aboutsummaryrefslogtreecommitdiffstats
path: root/www/http_load
diff options
context:
space:
mode:
authorsilby <silby@FreeBSD.org>2003-12-14 13:17:54 +0800
committersilby <silby@FreeBSD.org>2003-12-14 13:17:54 +0800
commit5854a9f9ebf866c9d3ec16a5dfbfd4fe577419d2 (patch)
tree621a42960cbfe85a2237b3c741f51e06f0b1c128 /www/http_load
parentcfbfa6c4eef7963c41aadc45eaf86f39b16ce776 (diff)
downloadfreebsd-ports-gnome-5854a9f9ebf866c9d3ec16a5dfbfd4fe577419d2.tar.gz
freebsd-ports-gnome-5854a9f9ebf866c9d3ec16a5dfbfd4fe577419d2.tar.zst
freebsd-ports-gnome-5854a9f9ebf866c9d3ec16a5dfbfd4fe577419d2.zip
Add a patch to the port which improves the -throttle option by
shrinking the receive socket buffer size to 2K. The patch has been submitted to http_load's author for possible inclusion in future versions of http_load.
Diffstat (limited to 'www/http_load')
-rw-r--r--www/http_load/Makefile1
-rw-r--r--www/http_load/files/patch-aa27
2 files changed, 28 insertions, 0 deletions
diff --git a/www/http_load/Makefile b/www/http_load/Makefile
index 838ed9d3618e..7b66bba7b7d9 100644
--- a/www/http_load/Makefile
+++ b/www/http_load/Makefile
@@ -7,6 +7,7 @@
PORTNAME= http_load
PORTVERSION= 20020104
+PORTREVISION= 1
CATEGORIES= www
MASTER_SITES= http://www.acme.com/software/http_load/
DISTNAME= ${PORTNAME}-04jan2002
diff --git a/www/http_load/files/patch-aa b/www/http_load/files/patch-aa
new file mode 100644
index 000000000000..c4f1622eb8cf
--- /dev/null
+++ b/www/http_load/files/patch-aa
@@ -0,0 +1,27 @@
+--- http_load.c.old Tue Dec 9 02:22:07 2003
++++ http_load.c Tue Dec 9 03:43:39 2003
+@@ -825,6 +825,7 @@
+ ClientData client_data;
+ int flags;
+ int sip_num;
++ int rcv_bytes, error;
+
+ /* Start filling in the connection slot. */
+ connections[cnum].url_num = url_num;
+@@ -863,6 +864,16 @@
+ perror( urls[url_num].url_str );
+ (void) close( connections[cnum].conn_fd );
+ return;
++ }
++
++ /* Shrink the recieve window to better imitate a slow connection. */
++ if ( do_throttle )
++ {
++ rcv_bytes = 2048;
++ error = setsockopt(connections[cnum].conn_fd, SOL_SOCKET, SO_RCVBUF,
++ (void *)&rcv_bytes, sizeof(rcv_bytes));
++ if (error)
++ perror("Setsockopt problem:");
+ }
+
+ if ( num_sips > 0 )