Click here to Skip to main content
Sign Up to vote bad
good
See more: C#.NET
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...
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 16-May-12 2:53am
Edited 16-May-12 3:27am

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:)
brinda p - 17-May-12 2:49am
In the case of wifi connection the router are not UDP enable so that's why receiver has problem... Still can not able to get pc specific configuration which connected through cable in lan. through which i can send the packet but can not able to receive packet data.

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

  Print Answers RSS
Your Filters
Interested
Ignored
     
0 Sergey Alexandrovich Kryukov 6,889
1 Prasad_Kulkarni 3,671
2 OriginalGriff 3,359
3 _Amy 3,312
4 CPallini 2,925


Advertise | Privacy | Mobile
Web04 | 2.6.130617.1 | Last Updated 16 May 2012
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid