mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
enable the SRS_PERF_TCP_NODELAY and add config tcp_nodelay. 2.0.182
This commit is contained in:
parent
267846a3fa
commit
9fb4640a8f
9 changed files with 44 additions and 12 deletions
|
@ -1750,7 +1750,7 @@ int SrsConfig::check_config()
|
|||
&& n != "time_jitter" && n != "mix_correct"
|
||||
&& n != "atc" && n != "atc_auto"
|
||||
&& n != "debug_srs_upnode"
|
||||
&& n != "mr" && n != "mw_latency" && n != "min_latency"
|
||||
&& n != "mr" && n != "mw_latency" && n != "min_latency" && n != "tcp_nodelay"
|
||||
&& n != "security" && n != "http_remux"
|
||||
&& n != "http" && n != "http_static"
|
||||
&& n != "hds"
|
||||
|
@ -2489,6 +2489,23 @@ bool SrsConfig::get_realtime_enabled(string vhost)
|
|||
return SRS_CONF_PERFER_FALSE(conf->arg0());
|
||||
}
|
||||
|
||||
bool SrsConfig::get_tcp_nodelay(string vhost)
|
||||
{
|
||||
static bool DEFAULT = false;
|
||||
|
||||
SrsConfDirective* conf = get_vhost(vhost);
|
||||
if (!conf) {
|
||||
return DEFAULT;
|
||||
}
|
||||
|
||||
conf = conf->get("tcp_nodelay");
|
||||
if (!conf || conf->arg0().empty()) {
|
||||
return DEFAULT;
|
||||
}
|
||||
|
||||
return SRS_CONF_PERFER_FALSE(conf->arg0());
|
||||
}
|
||||
|
||||
int SrsConfig::get_global_chunk_size()
|
||||
{
|
||||
SrsConfDirective* conf = root->get("chunk_size");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue