about summary refs log tree commit diff homepage
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2018-07-25 15:38:41 -0400
committerJune McEnroe <june@causal.agency>2018-07-25 15:38:41 -0400
commitc1bebac5eda29e99dd31359293c4b36fe1b91a93 (patch)
treeaebe38e62ebbd919f85026cc44ca0a957e8353e8
parentRevert "Do not set non-blocking on client sockets" (diff)
downloadtorus-c1bebac5eda29e99dd31359293c4b36fe1b91a93.tar.gz
torus-c1bebac5eda29e99dd31359293c4b36fe1b91a93.zip
Set client sockets SNDBUF to twice tile size
On Darwin and FreeBSD, this is already the default buffer size, but on
(32-bit?) NetBSD, it's only 4K.
Diffstat (limited to '')
-rw-r--r--server.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/server.c b/server.c
index b2b651b..a6807e8 100644
--- a/server.c
+++ b/server.c
@@ -356,6 +356,10 @@ int main() {
 			error = setsockopt(fd, SOL_SOCKET, SO_NOSIGPIPE, &on, sizeof(on));
 			if (error) err(EX_IOERR, "setsockopt");
 
+			int size = 2 * sizeof(struct Tile);
+			error = setsockopt(fd, SOL_SOCKET, SO_SNDBUF, &size, sizeof(size));
+			if (error) err(EX_IOERR, "setsockopt");
+
 			struct Client *client = clientAdd(fd);
 
 			EV_SET(&event, fd, EVFILT_READ, EV_ADD, 0, 0, client);
le='2018-12-09 23:28:26 +0100'>2018-12-09git: update to v2.20.0Christian Hesse 2018-11-25ui-blame: set repo for sbJason A. Donenfeld 2018-11-25auth-filter: pass url with query string attachedJason A. Donenfeld 2018-11-21git: use xz compressed archive for downloadChristian Hesse 2018-10-12git: update to v2.19.1Christian Hesse 2018-09-11ui-ssdiff: ban strcat()Christian Hesse 2018-09-11ui-ssdiff: ban strncpy()Christian Hesse 2018-09-11ui-shared: ban strcat()Christian Hesse 2018-09-11ui-patch: ban sprintf()Christian Hesse 2018-09-11ui-log: ban strncpy()Christian Hesse 2018-09-11ui-log: ban strcpy()Christian Hesse 2018-09-11parsing: ban sprintf()Christian Hesse 2018-09-11parsing: ban strncpy()Christian Hesse 2018-08-28filters: generate anchor links from markdownChristian Hesse 2018-08-03Bump version.Jason A. Donenfeld 2018-08-03clone: fix directory traversalJason A. Donenfeld 2018-08-03config: record repo.snapshot-prefix in the per-repo configKonstantin Ryabitsev