Skip to content

Commit

Permalink
Set TCP_NODELAY in all the listening sockets
Browse files Browse the repository at this point in the history
Maybe this should help latency a bit?  I don't have my testing setup
anymore, so, eh.
  • Loading branch information
lpereira committed May 10, 2024
1 parent 55ccf94 commit 9b3bdf5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/lib/lwan-socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,8 @@ static int set_socket_options(const struct lwan *l, int fd)
SET_SOCKET_OPTION(SOL_SOCKET, SO_LINGER,
(&(struct linger){.l_onoff = 1, .l_linger = 1}));

SET_SOCKET_OPTION_MAY_FAIL(SOL_TCP, TCP_NODELAY, (int[]){1});

#ifdef __linux__

#ifndef TCP_FASTOPEN
Expand Down

0 comments on commit 9b3bdf5

Please sign in to comment.