[libnice] why is TURN prefered before STUN ?

Philip Withnall philip at tecnocode.co.uk
Mon Nov 10 07:11:22 PST 2014


Hi,

On Mon, 2014-11-10 at 13:47 +0100, Klaus Kranz wrote:

> in the hope not chasing a phantom, I am wondering that even though a
> STUN srflx based connection is possible, libnice uses the TURN relay
> path.
> 
> Is there a way to let the library select relay as the last resort only
> in the case that STUN srflx fails ?

ICE assigns priorities to candidate pairs, and STUN is always
prioritised above TURN — precisely because TURN is so slow and
expensive.

Are you using trickle ICE[1] or normal ICE? How are you checking which
candidate pair libnice chooses to use? Are you waiting for the NiceAgent
to reach NICE_COMPONENT_STATE_CONNECTED or NICE_COMPONENT_STATE_READY?
The candidate pair selection isn’t final until STATE_READY.

This kind of general question can go on the libnice mailing so that
others can respond (and benefit from the answer!). :-)

Philip

[1]: https://tools.ietf.org/html/draft-ietf-mmusic-trickle-ice-01
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 213 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/nice/attachments/20141110/6dd6d1c5/attachment-0001.sig>


More information about the nice mailing list