[libnice] how does libnice keep a connection alive
philip at tecnocode.co.uk
Thu Sep 24 15:54:21 PDT 2015
On Tue, 2015-09-22 at 21:36 -0700, tom chen wrote:
> I am very new to ICE, I am confused how libnice keep alive the
> selected IP and port number? I am wondering if libnice creates a
> socket using the local candidates port number, binds with the
> candidatess IP address, then use the socket to periodically send
> some commands to keep the connection alive. If so, since the
> candidates IP address and port number have been used by libnice
> refreshing thread, how can we create a socket to use that candidates
> IP & port to transport media stream?
There is a whole section on this in the ICE specification (RFC 5245,
Basically, if you’re using ICE over UDP, all your data is wrapped in
the STUN protocol, which means libnice can send no-op STUN binding
messages as keepalives.
This works because to use libnice, you must send all your packets
through it, using nice_agent_send_messages_nonblocking() and
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 213 bytes
Desc: This is a digitally signed message part
More information about the nice