Enable TCP_NODELAY
This commit is contained in:
7
kike.c
7
kike.c
@@ -3421,6 +3421,13 @@ irc_try_fetch_client (struct server_context *ctx, int listen_fd)
|
||||
c->ping_timer.dispatcher = on_client_ping_timer;
|
||||
c->ping_timer.user_data = c;
|
||||
|
||||
// A little bit questionable once the traffic gets high enough (IMO),
|
||||
// but it reduces silly latencies that we don't need because we already
|
||||
// do buffer our output
|
||||
int yes = 1;
|
||||
soft_assert (setsockopt (fd, IPPROTO_TCP, TCP_NODELAY,
|
||||
&yes, sizeof yes) != -1);
|
||||
|
||||
set_blocking (fd, false);
|
||||
client_update_poller (c, NULL);
|
||||
client_set_kill_timer (c);
|
||||
|
||||
Reference in New Issue
Block a user