<div><font color="#000000">I'm using liveMedia to build a simple Streaming Server,</font></div>
<div><font color="#000000">and I found there's problem with the socketJoinGroupSSM(...) on WIN32 system, that&nbsp;&nbsp;the sourceFilterAddr should set by IP_MULTICAST_IF, not&nbsp;&nbsp;IP_ADD_MEMBERSHIP.</font></div>
<div>&nbsp;</div>
<div>So I changed it like this:</div>
<div>&nbsp;</div>
<div><font color="#000066">Boolean socketJoinGroupSSM(UsageEnvironment&amp; env, int socket,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; netAddressBits groupAddress,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; netAddressBits sourceFilterAddr) {<br>&nbsp; if (!IsMulticastAddress(groupAddress)) return True; // ignore this case
<br>#if defined(__WIN32__) || defined(_WIN32)<br>/**Here Add Win32 Operations By SHENMC 20060303*/<br>&nbsp; struct ip_mreq imr;<br>&nbsp; imr.imr_multiaddr.s_addr = groupAddress;<br>&nbsp; imr.imr_interface.s_addr = ReceivingInterfaceAddr;
<br>&nbsp; if (setsockopt(socket, IPPROTO_IP, IP_ADD_MEMBERSHIP,<br>&nbsp;&nbsp; (const char*)&amp;imr, sizeof (struct ip_mreq)) &lt; 0) {<br>&nbsp;&nbsp;&nbsp; if (env.getErrno() != 0) {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // That piece-of-shit toy operating system (Windows) sometimes lies
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // about setsockopt() failing!<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; socketErr(env, &quot;setsockopt(IP_ADD_MEMBERSHIP) error: &quot;);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return False;<br>&nbsp;&nbsp;&nbsp; }<br>&nbsp; }<br>&nbsp; /**In Win32 system, the sourceFilterAddr should set by IP_MULTICAST_IF */
<br>&nbsp; if(setsockopt(socket, IPPROTO_IP, IP_MULTICAST_IF,<br>&nbsp; &nbsp;(char *)&amp;sourceFilterAddr,<br>&nbsp; &nbsp;sizeof(sourceFilterAddr)) &lt; 0)<br>&nbsp; {<br>&nbsp;socketErr(env, &quot;setsockopt(IP_MULTICAST_IF) error: &quot;);<br>&nbsp; }<br>&nbsp; return True;
<br>#else /*NOT WIN32*/<br>&nbsp; struct ip_mreq_source imr;<br>&nbsp; imr.imr_multiaddr.s_addr = groupAddress;<br>&nbsp; imr.imr_sourceaddr.s_addr = sourceFilterAddr;<br>&nbsp; imr.imr_interface.s_addr = ReceivingInterfaceAddr;<br>&nbsp; if (setsockopt(socket, IPPROTO_IP, IP_ADD_SOURCE_MEMBERSHIP,
<br>&nbsp;&nbsp; (const char*)&amp;imr, sizeof (struct ip_mreq_source)) &lt; 0) {<br>&nbsp;&nbsp;&nbsp; socketErr(env, &quot;setsockopt(IP_ADD_SOURCE_MEMBERSHIP) error: &quot;);<br>&nbsp;&nbsp;&nbsp; return False;<br>&nbsp; }<br>&nbsp; return True;<br>#endif<br>}</font><br clear="all">
</div>
<div>&nbsp;</div>
<div>And it can work correctly.<br>-- <br>Aliex Shen, From the world. </div>