Link to home
Start Free TrialLog in
Avatar of srk1982
srk1982

asked on

Problem Trying to unicast packets to available networks.

Trying to unicast packets to available networks. There are totally 3 networks. Managed to get packets in only one network.But i am not able to receive the packets in different networks.

using this code..
foreach (var i in System.Net.NetworkInformation.NetworkInterface.GetAllNetworkInterfaces())
            {
                foreach (var ua in i.GetIPProperties().UnicastAddresses)
                {
                    System.Windows.Forms.MessageBox.Show(ua.Address.ToString());
                    IPAddress Tip = IPAddress.Parse(ua.Address.ToString());
                    IPEndPoint targetEndPoint = new IPEndPoint(Tip, iTargetPort);
                    MyUdpClient sendUdpClient = new MyUdpClient();
                    int numBytesSent = sendUdpClient.Send(CombineHeaderBody, CombineHeaderBody.Length, targetEndPoint);
                }
            }

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of topdog770
topdog770
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial