diff options
author | Fabrice Bellet <fabrice@bellet.info> | 2016-06-09 23:28:43 +0200 |
---|---|---|
committer | Fabrice Bellet <fabrice@bellet.info> | 2017-06-12 17:55:45 +0200 |
commit | 8bb210c5af4bcaf342d7fa4fef6034269e976532 (patch) | |
tree | c593e2724a2a39930d4ac8c6649f47d7003772c9 /agent/discovery.c | |
parent | 80c613699786567fd93db74377138600794a86e0 (diff) | |
download | libnice-8bb210c5af4bcaf342d7fa4fef6034269e976532.tar.gz |
stun timer: make properties for stun timer tunables
Three STUN binding request properties should be customisable. RFC 5245
describes the retransmission timer of the STUN transaction 'RTO', and
RFC 5389 describes the number of retransmissions to send until a
response is received 'Rc'. The third property is the 'RTO' when
a reliable connection is used.
RFC 5389 introduces a supplementary property 'Rm' as a multiplier used
to compute the final timeout RTO * Rm. However, this property is not
added in libnice, because this would require breaking the public API for
STUN. Currently, our STUN implementation hardcodes a division by two for
this final timeout.
Differential Revision: https://phabricator.freedesktop.org/D1109
Diffstat (limited to 'agent/discovery.c')
-rw-r--r-- | agent/discovery.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/agent/discovery.c b/agent/discovery.c index 7a890a0..4cc99c2 100644 --- a/agent/discovery.c +++ b/agent/discovery.c @@ -1072,11 +1072,11 @@ static gboolean priv_discovery_tick_unlocked (gpointer pointer) if (buffer_len > 0) { if (nice_socket_is_reliable (cand->nicesock)) { - stun_timer_start_reliable (&cand->timer, - STUN_TIMER_DEFAULT_RELIABLE_TIMEOUT); + stun_timer_start_reliable (&cand->timer, agent->stun_reliable_timeout); } else { - stun_timer_start (&cand->timer, 200, - STUN_TIMER_DEFAULT_MAX_RETRANSMISSIONS); + stun_timer_start (&cand->timer, + agent->stun_initial_timeout, + agent->stun_max_retransmissions); } /* send the conncheck */ |