[libnice] Detecting the peer has disconnected

Philip Withnall philip at tecnocode.co.uk
Fri Apr 24 06:26:27 PDT 2015

On Fri, 2015-04-24 at 11:47 +0000, Curieux Tres wrote:

> >> I have 2 instances of libnice talking to each other nicely
> >> But when one of the instance is killed, the other one is not
> notified
> >> and retries forever to send data.
> >> What would be the right way to get that "peer is gone"
> information ?
> >> I've hooked all the signals but they are not invoked in that case
> >> (might have made a mistake there).
> >
> >
> >PseudoTcpSocket has supported this since libnice 0.1.8, using its
> FIN–
> >ACK support.
> >
> >Make sure PseudoTcpSocket:support-fin-ack is set to TRUE.
> >pseudo_tcp_socket_recv() should return 0 when the remote peer has
> called
> >pseudo_tcp_socket_close(). You can also check this using
> >pseudo_tcp_socket_is_closed_remotely().
> Thanks for the info, 
> In the case the peer has been killed, i'm not sure that will work,
> since there will be no response at all (?)

Correct, you will have to wait for the timeout. This is just the same as
if a normal TCP peer goes away unexpectedly on a traditional (non-ICE)

-------------- 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/20150424/35efcead/attachment-0001.sig>

More information about the nice mailing list