<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Correction. The dropping of datagrams is NOT related to the Timeout, but happens at about 5 minute intervals regardless of the Timeout. Just a coincidence that my Timeout was set to 5 minutes.<div class=""><br class=""></div><div class="">Mark.<br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Feb 4, 2021, at 3:04 PM, Mark Geib <<a href="mailto:mark.geib.44@gmail.com" class="">mark.geib.44@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="content-isolator__container"><meta http-equiv="Content-Type" content="text/html; charset=us-ascii" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div class=""><span style="font-style: normal;" class=""><font face="Avenir-Book" class="">In order to join a source-specific multicast group I am trying the new socket module. I am able to join the multicast and start receiving datagrams by spawning the function below. The gen_udp module does not support joining a source-specific multicast currently.</font></span></div><span style="font-style: normal;" class=""><div class=""><font face="Andale Mono" class=""><span style="font-style: normal;" class=""><br class=""></span></font></div><font face="Andale Mono" class="">active_socket(Socket, Parent, Timeout) -></font><br class=""> <font face="Andale Mono" class=""> case</font> <font face="Andale Mono" class="">socket:recvfrom(Socket, 0, [], Timeout)</font> <font face="Andale Mono" class="">of</font><br class=""><font face="Andale Mono" class=""> {ok, {#{port :=</font> <font face="Andale Mono" class="">Port, addr :=</font> <font face="Andale Mono" class="">Addr}, Data}} -></font><br class=""> <font face="Andale Mono" class=""> Parent</font> <font face="Andale Mono" class="">! {udp, Addr, Port, Data},</font><br class=""> <font face="Andale Mono" class=""> active_socket(Socket, Parent, Timeout);</font><br class=""><br class=""><font face="Andale Mono" class=""> {error, Reason} -></font><br class=""> <font face="Andale Mono" class=""> Parent</font> <font face="Andale Mono" class="">! {error, socket, Reason},</font><br class=""> <font face="Andale Mono" class=""> active_socket(Socket, Parent, Timeout)</font><br class=""><br class=""> <font face="Andale Mono" class="">end.</font><br class=""></span><br class=""><div class="">The multicast is a 45Mb RTP MPEG-TS stream. I am able to receive and verify the RTP sequence number successfully. However, about every Timeout period, in the function above, there are a number of datagrams dropped, that is, the RTP sequence number has a gap of about 200. This continues to happen as long as the process runs. Between the drops everything looks fine.</div><div class=""><br class=""></div><div class="">As you can see, my approach is to simply have a recvfrom pending at all times so when a datagram arrives the recvfrom returns, I forward the datagram and call recvfrom again. The Timeout is simply to avoid recvfrom returning with no data.</div><div class=""><br class=""></div><div class="">Thanks,</div><div class=""><br class=""></div><div class="">Mark.</div></div></div></div></blockquote></div><br class=""></div></body></html>