diff options
author | Přemysl Janouch <p.janouch@gmail.com> | 2015-11-22 02:12:52 +0100 |
---|---|---|
committer | Přemysl Janouch <p.janouch@gmail.com> | 2015-11-22 02:12:52 +0100 |
commit | 36c59ff375ea2399961df54403676e8e8457f4b6 (patch) | |
tree | 61d1a56dcd12107036d45fb3ca90d2968fa14558 /degesch.c | |
parent | 71f3532e04e5c76327363a3fd36b506f54e5043d (diff) | |
download | xK-36c59ff375ea2399961df54403676e8e8457f4b6.tar.gz xK-36c59ff375ea2399961df54403676e8e8457f4b6.tar.xz xK-36c59ff375ea2399961df54403676e8e8457f4b6.zip |
Enable TCP_NODELAY
Diffstat (limited to 'degesch.c')
-rw-r--r-- | degesch.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -4732,6 +4732,12 @@ irc_finish_connection (struct server *s, int socket) { struct app_context *ctx = s->ctx; + // Most of our output comes from the user one full command at a time and we + // use output buffering, so it makes a lot of sense to avoid these delays + int yes = 1; + soft_assert (setsockopt (socket, IPPROTO_TCP, TCP_NODELAY, + &yes, sizeof yes) != -1); + set_blocking (socket, false); s->socket = socket; s->transport = get_config_boolean (s->config, "tls") |