Commit 04ae469a authored by Dridi Boukelmoune's avatar Dridi Boukelmoune Committed by Martin Blix Grydeland

vca: Give all const socket options placeholers

The SO_KEEPALIVE justification used to precede such a constant and was
left confusingly lingering over the unrelated need_test variable.
parent 789186e9
......@@ -130,6 +130,13 @@ static const struct linger linger = {
* hung up on connections returning from waitinglists
*/
static const unsigned so_keepalive = 1;
/* We disable Nagle's algorithm in favor of low latency setups.
*/
static const unsigned tcp_nodelay = 1;
static unsigned need_test;
/*--------------------------------------------------------------------
......@@ -190,13 +197,13 @@ vca_sock_opt_init(void)
} while (0)
SET_VAL(SO_LINGER, so, lg, linger);
SET_VAL(SO_KEEPALIVE, so, i, 1);
SET_VAL(SO_KEEPALIVE, so, i, so_keepalive);
NEW_VAL(SO_SNDTIMEO, so, tv,
VTIM_timeval(cache_param->idle_send_timeout));
NEW_VAL(SO_RCVTIMEO, so, tv,
VTIM_timeval(cache_param->timeout_idle));
SET_VAL(TCP_NODELAY, so, i, tcp_nodelay);
#ifdef HAVE_TCP_KEEP
SET_VAL(TCP_NODELAY, so, i, 1);
NEW_VAL(TCP_KEEPIDLE, so, i,
(int)cache_param->tcp_keepalive_time);
NEW_VAL(TCP_KEEPCNT, so, i,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment