Apply patch from Scott Lamb adding an output buffer for the TCP sockets.
This helps coalescing multiple send_meta() commands into one TCP packet. Also limit the size of the output buffer before dropping PACKETs.
This commit is contained in:
parent
a5a4d2b865
commit
228e7a5c8f
13 changed files with 147 additions and 77 deletions
|
|
@ -286,8 +286,6 @@ bool setup_myself(void)
|
|||
if(get_config_bool(lookup_config(myself->connection->config_tree, "TCPOnly"), &choice) && choice)
|
||||
myself->options |= OPTION_TCPONLY;
|
||||
|
||||
get_config_bool(lookup_config(config_tree, "BlockingTCP"), &blockingtcp);
|
||||
|
||||
if(get_config_bool(lookup_config(myself->connection->config_tree, "PMTUDiscovery"), &choice) && choice)
|
||||
myself->options |= OPTION_PMTU_DISCOVERY;
|
||||
|
||||
|
|
@ -536,12 +534,20 @@ bool setup_network_connections(void)
|
|||
init_events();
|
||||
init_requests();
|
||||
|
||||
if(get_config_int(lookup_config(config_tree, "PingTimeout"), &pingtimeout)) {
|
||||
if(pingtimeout < 1) {
|
||||
pingtimeout = 86400;
|
||||
if(get_config_int(lookup_config(config_tree, "PingInterval"), &pinginterval)) {
|
||||
if(pinginterval < 1) {
|
||||
pinginterval = 86400;
|
||||
}
|
||||
} else
|
||||
pingtimeout = 60;
|
||||
pinginterval = 60;
|
||||
|
||||
if(!get_config_int(lookup_config(config_tree, "PingTimeout"), &pingtimeout))
|
||||
pingtimeout = 5;
|
||||
if(pingtimeout < 1 || pingtimeout > pinginterval)
|
||||
pingtimeout = pinginterval;
|
||||
|
||||
if(!get_config_int(lookup_config(config_tree, "MaxOutputBufferSize"), &maxoutbufsize))
|
||||
maxoutbufsize = 4 * MTU;
|
||||
|
||||
if(!setup_myself())
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue