How to clear socket buffer when transport is attached again

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

In pjmedia/transport_udp.c, the transport_attach() and transport_detach()
is used to attach and detach the transport.

AFAIK, detach is merely removing the callbacks, but the actual UDP sockets
are still active. So the UDP socket buffer still receives packets until it
is full. Afterward packets are discard.

So what happen when we attach again? Via ioqueue, we read packets in this
UDP socket buffer, which are old ???? Imagine we attach 1 minute after
detaching, we hear our friend's 1-minute-ago-voice !!!???

So how to clear this UDP socket buffer ?


-- 
Khoa Pham
HCMC University of Science
www.fantageek.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20131003/7f9d0016/attachment-0001.html>


[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux