aboutsummaryrefslogtreecommitdiff
path: root/src/stream/ngx_stream_core_module.c
diff options
context:
space:
mode:
authorVladimir Homutov <vl@nginx.com>2015-08-10 12:14:41 +0300
committerVladimir Homutov <vl@nginx.com>2015-08-10 12:14:41 +0300
commitb537def75ef942346122e1f182104851f5e039a0 (patch)
tree2295bbf72011a19b956c402a7866706916e69022 /src/stream/ngx_stream_core_module.c
parent50ff8b3c3a3eba0984ce55c63ab8ac07dcb65265 (diff)
downloadnginx-b537def75ef942346122e1f182104851f5e039a0.tar.gz
nginx-b537def75ef942346122e1f182104851f5e039a0.zip
Stream: the "tcp_nodelay" directive.
Diffstat (limited to 'src/stream/ngx_stream_core_module.c')
-rw-r--r--src/stream/ngx_stream_core_module.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/stream/ngx_stream_core_module.c b/src/stream/ngx_stream_core_module.c
index 246f55c45..b02e5ca5a 100644
--- a/src/stream/ngx_stream_core_module.c
+++ b/src/stream/ngx_stream_core_module.c
@@ -45,6 +45,13 @@ static ngx_command_t ngx_stream_core_commands[] = {
0,
NULL },
+ { ngx_string("tcp_nodelay"),
+ NGX_STREAM_MAIN_CONF|NGX_STREAM_SRV_CONF|NGX_CONF_FLAG,
+ ngx_conf_set_flag_slot,
+ NGX_STREAM_SRV_CONF_OFFSET,
+ offsetof(ngx_stream_core_srv_conf_t, tcp_nodelay),
+ NULL },
+
ngx_null_command
};
@@ -122,6 +129,7 @@ ngx_stream_core_create_srv_conf(ngx_conf_t *cf)
cscf->file_name = cf->conf_file->file.name.data;
cscf->line = cf->conf_file->line;
+ cscf->tcp_nodelay = NGX_CONF_UNSET;
return cscf;
}
@@ -148,6 +156,8 @@ ngx_stream_core_merge_srv_conf(ngx_conf_t *cf, void *parent, void *child)
}
}
+ ngx_conf_merge_value(conf->tcp_nodelay, prev->tcp_nodelay, 1);
+
return NGX_CONF_OK;
}