[libnice] a question on STUN retransmission timer

Tom Chen chentom60 at hotmail.com
Fri Nov 6 10:38:58 PST 2015


In stun\usages\timer.h, there are some flags related to STUN retransmission timer.

 * The default intial timeout to use for the timer

 * The default maximum retransmissions allowed before a timer decides to timeout

 * stun_timer_start:
 * Starts a STUN transaction retransmission timer.
 * This should be called as soon as you send the message for the first time on
 * a UDP socket.
 * The timeout before the next retransmission is set to @initial_timeout, then
 * each time a packet is retransmited, that timeout will be doubled, until the
 * @max_retransmissions retransmissions limit is reached.
 * total_timeout =  initial_timeout * (2^(max_retransmissions + 1) - 1);

Reducing STUN_TIMER_DEFAULT_MAX_RETRANSMISSIONS can significantly reduce the time used in local candidate gathering.

I am wondering why the equation in timer.h which is used to calculate the total time needed for local candidate gathering does not consider the number of local & remote network interfaces?

 total_timeout =  initial_timeout * (2^(max_retransmissions + 1) - 1);

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/nice/attachments/20151106/d092fcfa/attachment.html>

More information about the nice mailing list