Click here to Skip to main content
15,906,220 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
Hi,


While try to receiving data using UDP brodcast unable to get response from specific type of work stations like,

- If laptop in same network connected through wifi connection in network.
- Or PC in same network but in different domain.

If PC in same domain and connected through lan receiver is able to receive data but else it will not able to receive data.

Code...
C#
Socket lReceiver = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);

 IPEndPoint lReceiverIP = new IPEndPoint(IPAddress.Any, RECEIVER_PORT);

                //Start Receiver To receive Data
                lReceiver.Bind(lReceiverIP);
 while (true)
                {
if (lReceiver.Available > 0)
                    {


}
}

Thanks in advance,
Brinda
Posted
Updated 16-May-12 3:27am
v2
Comments
Zoltán Zörgő 16-May-12 9:30am    
UDP broadcasts are not routed by default. Are you sure your packets are routed?
Read this: http://www.networkeducator.com/udp-broadcast.htm
brinda p 17-May-12 1:29am    
Ya udp broadcast packet can not be routed if router is not routed enable. so first i have to verify that in wifi connection.
Umer Aziz Malik 16-May-12 9:51am    
Have you tried Port Forwarding when the communicating parties are on different networks?
brinda p 17-May-12 1:39am    
Thanks for comment. i dont have any idea regarding port forwarding will check it. But in this case all workstation are in LAN only.
Umer Aziz Malik 17-May-12 2:04am    
www.portforward.com
The best resource on port forwarding in general:)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900