From c1bebac5eda29e99dd31359293c4b36fe1b91a93 Mon Sep 17 00:00:00 2001 From: Curtis McEnroe Date: Wed, 25 Jul 2018 15:38:41 -0400 Subject: 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. --- server.c | 4 ++++ 1 file changed, 4 insertions(+) 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); -- cgit 1.4.1