<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>Hi Guys,<br><br>There is indeed an network interface that has no internet access and delays candidates gathering. After I used nice_agent_add_local() to manually add those interfaces with internet access, then the local candidates gathering is done immediately.  <br><br>Thank you for helping me on this issue!<br><br>Tom<br><br>> From: olivier.crete@collabora.com<br>> To: felixschlitter@gmail.com; nice@lists.freedesktop.org<br>> Date: Thu, 15 Oct 2015 12:01:43 +0100<br>> Subject: Re: [libnice] why it takes so long (3 second) to get Local candidates?<br>> <br>> Hello,<br>> <br>> libnice will do a STUN query from every local interface, in case you<br>> have a multi-homed device, so if some of them are not Internet<br>> connected, then it waits for all of them to timeout. You can just<br>> ignore the state change and start sending candidates earlier if the<br>> delay is unacceptable for your application.<br>> <br>> Olivier<br>> <br>> On Thu, 2015-10-15 at 18:25 +1300, Felix Schlitter wrote:<br>> > I found that it can take a long time if I leave libnice to figure out<br>> > my local interfaces. If I tell which local address I want to use,<br>> > it's a lot faster. But that may have been because it tried to use a<br>> > local interface that had no internet connection. Maybe see if<br>> > `nice_agent_add_local_address` does anything for you.<br>> > <br>> > On Thu, Oct 15, 2015 at 6:01 PM, tom chen <chentom60@hotmail.com><br>> > wrote:<br>> > > Hello,<br>> > >  <br>> > > I am using an external public STUN server,<br>> > > stun.l.google.com(74.125.194.127), port: 19302, to try<br>> > > /examples/simple-example.c.<br>> > >  <br>> > > simple-example can get its public IP as expected from this STUN<br>> > > server, so the public STUN server really works. However, I notice<br>> > > that, somehow, it takes around 3 second to get local candidate<br>> > > list. Any idea why so long? Then I installed a local STUN server in<br>> > > our intranet, still has same delay. I am wondering if there is<br>> > > anything waiting for some events during the gathering but always<br>> > > timeout?<br>> > >  <br>> > > Tom<br>> > >  <br>> > > tao@ubuntu:~/workspace/libnice-0.1.13/examples$ ./simple-example 1<br>> > > 74.125.194.127 19302<br>> > > Copy this line to remote client:<br>> > >  <br>> > >   vPRk owHFru8Z6Dx8hj9TKel7Zl<br>> > > 1,2013266431,fe80::20c:29ff:fe34:d0c8,42411,host<br>> > > 2,1019216383,fe80::20c:29ff:fe34:d0c8,0,host<br>> > > 3,1015022079,fe80::20c:29ff:fe34:d0c8,50240,host<br>> > > 4,2013266431,fe80::20c:29ff:fe34:d0be,51731,host<br>> > > 5,1019216383,fe80::20c:29ff:fe34:d0be,0,host<br>> > > 6,1015022079,fe80::20c:29ff:fe34:d0be,43916,host<br>> > > 7,2013266431,fe80::20c:29ff:fe34:d0b4,35004,host<br>> > > 8,1019216383,fe80::20c:29ff:fe34:d0b4,0,host<br>> > > 9,1015022079,fe80::20c:29ff:fe34:d0b4,51142,host<br>> > > 10,2013266431,192.168.0.60,33635,host<br>> > > 11,1019216383,192.168.0.60,0,host<br>> > > 12,1015022079,192.168.0.60,51301,host<br>> > > 13,2013266431,172.16.1.129,41734,host<br>> > > 14,1019216383,172.16.1.129,0,host<br>> > > 15,1015022079,172.16.1.129,46629,host<br>> > > 16,2013266431,10.113.54.60,41481,host<br>> > > 17,1019216383,10.113.54.60,0,host<br>> > > 18,1015022079,10.113.54.60,33328,host<br>> > > 19,1677722111,204.96.168.3,41481,srflx        ç Public IP<br>> > > candidates<br>> > > 20,847249919,204.96.168.3,0,srflx<br>> > > 21,843055615,204.96.168.3,33328,srflx<br>> > >  <br>> > > Enter remote data (single line, no wrapping):<br>> > > > ^C<br>> > > <br>> > > <br>> > > <br>> > > Statement Of Confidentiality:<br>> > > <br>> > > This electronic message transmission, and all attachments, contains<br>> > > information from Extron Electronics which is confidential and<br>> > > privileged. The information is for the exclusive viewing or use of<br>> > > the intended recipient. If you are not the intended recipient, be<br>> > > aware that any disclosure, copying, distribution or use of the<br>> > > contents of this information is prohibited. If you have received<br>> > > this electronic transmission in error, please notify the sender<br>> > > immediately by a "reply to sender only" message and destroy all<br>> > > electronic and hard copies of the communication, including<br>> > > attachments.<br>> > > <br>> > > _______________________________________________<br>> > > nice mailing list<br>> > > nice@lists.freedesktop.org<br>> > > http://lists.freedesktop.org/mailman/listinfo/nice<br>> > > <br>> > _______________________________________________<br>> > nice mailing list<br>> > nice@lists.freedesktop.org<br>> > http://lists.freedesktop.org/mailman/listinfo/nice<br>> -- <br>> Olivier Crête<br>> olivier.crete@collabora.com<br>> <br>> <br>> _______________________________________________<br>> nice mailing list<br>> nice@lists.freedesktop.org<br>> http://lists.freedesktop.org/mailman/listinfo/nice<br>                                           </div></body>
</html>