[Nice] public API to get selected pair
Olivier Crête
olivier.crete at collabora.com
Tue Jan 22 14:38:18 PST 2013
Hello,
On Tue, 2013-01-22 at 16:03 -0600, Bryce Allen wrote:
> I notice that there is nice_agent_set_selected_pair, but not
> get_selected_pair.
You can listen to the "new-selected-pair" signal, it will tell you which
candidates have been selected.. But I agree it would be good to add such
an API for completeness.
> If I can get the selected pair, I can destroy NiceAgent and
> immediately bind to the local base address and send to remote, before
> any intermediate firewall sessions timeout. UDT sends frequent keep
> alives so once the application takes over the bindings will be
> maintained.
Are you aware that the libnice reliable mode is not TCP, but a custom
TCP-over-UDP implementation (that is compatible with the one used by
Google Talk). And it's definitely not compatible with UDT, which is a
completely different protocol. So you need to be using libnice on both
sides (or libjingle) to send and receive. Alternatively, you could try
to put libnice below UDT, but I'm not sure how the UDT code works.
Also, if you end up using a TURN relay, you need to send through
libnice, as the packets are encapsulated.
--
Olivier Crête
olivier.crete at collabora.com
More information about the nice
mailing list