Enable TCP_NODELAY

This commit is contained in:
2015-11-22 02:12:52 +01:00
parent 71f3532e04
commit 36c59ff375
3 changed files with 14 additions and 0 deletions

View File

@@ -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")