By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,524 Members | 1,475 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,524 IT Pros & Developers. It's quick & easy.

UDP Client and Multiple NIC

P: n/a
I have a small UDPClient listener app that displays UDP traffic from another
app running on several servers. It works great most of the time. When it is
installed on a box that has multiple NICs, I have a problem if one of the
NICs is down (i.e. a wireless connection that is not connected). If I
disable that NIC and restart the app, it works great. If I disable it once,
it doesn't matter if it is re-enabled as if it moves down the list and isn't
1st anymore. Is there a way to determine what NICs are valid/connected and
force the UDP client to bind? Here is the code:

Dim lIPAddress = IPAddress.Parse("224.168.100.2")
Dim lUdpClient = New UdpClient(1000, AddressFamily.InterNetwork)
lUdpClient.JoinMulticastGroup(lIPAddress)

Dim lIPEndPoint As New IPEndPoint(IPAddress.Any, 0)
While 1 = 1
Dim lByte As Byte() = lUdpClient.Receive(lIPEndPoint)
'Convert lByte to string
'...
Loop

Thanks in advance.
Mar 31 '06 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.