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
commitd864ce8543216dc93688282f0e8e1df0ffcafa2b (patch)
treea39026aba4a1f399ab4d919fed0eccb52e11837d
parentRevert "Do not set non-blocking on client sockets" (diff)
downloadtorus-d864ce8543216dc93688282f0e8e1df0ffcafa2b.tar.gz
torus-d864ce8543216dc93688282f0e8e1df0ffcafa2b.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.
-rw-r--r--server.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/server.c b/server.c
index 89ba03c..9cae5dd 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);
EADME.7June McEnroe 2021-01-12Add htagml exampleJune McEnroe 2021-01-12Use mandoc and htagml for bin htmlJune McEnroe 2021-01-12Add htagmlJune McEnroe 2021-01-12Replace causal.agency with a simple mdoc pageJune McEnroe 2021-01-11Publish "Using vi"June McEnroe 2021-01-11Enable diff.colorMovedJune McEnroe 2021-01-10Set less search case-insensitiveJune McEnroe 2021-01-10Set EXINITJune McEnroe neovim is laggy as hell in my OpenBSD VM, so I switched to vi so I could type without getting frustrated. 2021-01-09Add c -t flag to print expression typeJune McEnroe Also add missing float case. 2021-01-05Update taglineJune McEnroe