summaryrefslogtreecommitdiff
path: root/degesch.c
diff options
context:
space:
mode:
authorPřemysl Janouch <p.janouch@gmail.com>2015-11-22 02:12:52 +0100
committerPřemysl Janouch <p.janouch@gmail.com>2015-11-22 02:12:52 +0100
commit36c59ff375ea2399961df54403676e8e8457f4b6 (patch)
tree61d1a56dcd12107036d45fb3ca90d2968fa14558 /degesch.c
parent71f3532e04e5c76327363a3fd36b506f54e5043d (diff)
downloadxK-36c59ff375ea2399961df54403676e8e8457f4b6.tar.gz
xK-36c59ff375ea2399961df54403676e8e8457f4b6.tar.xz
xK-36c59ff375ea2399961df54403676e8e8457f4b6.zip
Enable TCP_NODELAY
Diffstat (limited to 'degesch.c')
-rw-r--r--degesch.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/degesch.c b/degesch.c
index 80e3d2c..bc70a7a 100644
--- a/degesch.c
+++ b/degesch.c
@@ -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")