<DIV>Hello to everyone,</DIV>
<DIV> </DIV>
<DIV>For a while now, I am trying to use UDP sockets to listen to a broadcast message from a server of mine to an exact port 4984 thru my network but I keep on getting the above message <EM><STRONG>Timeout Occured while trying to listen to Broadcast IP. </STRONG>What ever I have tryied has failed since now.</EM></DIV>
<DIV> </DIV>
<DIV>Example of my code:</DIV>
<DIV><FONT size=2><B><FONT size=2></FONT></B></FONT> </DIV>
<DIV><FONT size=2><B><FONT size=2>UDPSOCKET *udpClient;<BR><B>int</B> ret; <BR>u_long ClientAddress;<BR>u_short ClientPort;<BR><B>unsigned</B> <B>char</B> *rxBuffer;<BR><BR></FONT><FONT size=2>rxBuffer = NutHeapAlloc(256);<BR><BR></FONT></B></FONT><FONT size=2><B><FONT size=2>udpClient=</FONT><FONT color=#008000 size=2>NutUdpCreateSocket(4984); </FONT><FONT size=2><BR><BR><B>while</B>(ServerSocketID==0)<BR>{<BR> memset(rxBuffer,0,256);<BR><B> switch</B>(ret=NutUdpReceiveFrom(udpClient,&ClientAddress,&ClientPort,rxBuffer,<B>sizeof</B>(RxBuffer),4000))<BR>{<BR><B>case</B> -1:{<BR>printf(<I>"An error occured while trying to listen to Broadcast IP.\n"</I>);<BR><B>break</B>;}<BR><B>case</B> 0:{<BR>printf(<I>"Timeout Occured while trying to listen to Broadcast IP.\n"</I>);<BR><B>break</B>;}<BR><B>default</B>:{<BR>printf(<I>"Received %s\n"</I>,rxBuffer);<BR>ServerSocketID=ClientAddress; <BR>printf(<I>"Server was at address :%s\n"</I>,inet_ntoa(ServerSocketID));
 <BR>NutUdpDestroySocket(udpClient);<BR><B>break</B>;} <BR>} <BR>}<BR></FONT></B></FONT></DIV>
<DIV><FONT size=2><FONT size=2>Can anyone tell me what I'm doing wrong, or even better to send me code that it is actually working.</FONT></FONT></DIV>
<DIV><FONT size=2><FONT size=2></FONT></FONT> </DIV>
<DIV><FONT size=2><FONT size=2>Thanks for your help.</DIV></FONT></FONT><p><br><hr size=1><b>Do You Yahoo!?</b><br>Αποκτήστε την δωρεάν σας
@yahoo.gr διεύθυνση  στο 
<a href="http://www.otenet.gr/">Yahoo! Mail</a>.<br>