2

I have a UDPClient listener running on a Windows 7 machine. If I bind to the local IP of the wired ethernet adapter as follows I'm able to receive UDP data without any problems:

IPAddress^ localIP = IPAddress::Parse("10.10.7.76");
IPEndPoint^ ep = gcnew IPEndPoint(localIP, 10002);
UdpClient^ udpClient = gcnew UdpClient(ep);

If I bind to the wifi adapter and disable the wired connection I get nothing:

IPAddress^ localIP = IPAddress::Parse("192.168.1.2");
IPEndPoint^ ep = gcnew IPEndPoint(localIP, 10002);
UdpClient^ udpClient = gcnew UdpClient(ep);

Wireshark confirms that I'm definitely receiving traffic to that IP / port so what am I doing wrong? Is there some issue in the way I'm binding to that address / port?

Jon Cage
  • 36,366
  • 38
  • 137
  • 215

0 Answers0