<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=""><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></body></html>