title: UDP Multicast with multiple networks in C#
body: <p>Recently, I've changed my programme, which used TCP/IP before to UDP multicast, due to it using a lot less resources. </p>
  
  <p>The problem I've encountered is that on few machines, where I planned to use it, there are two or more netwrok cards with connections running.</p>
  
  <p>Can I choose which connection to multicast on from the program level? I tried changing different settings in system, like network priorities, but nothing worked.</p>
  
  <p>For multicasting I use:</p>
  
  <pre><code>UdpClient publisher = new UdpClient(IP, Port);
  publisher.Send(data, data.Length);
  </code></pre>
  
  <p>Where IP is one from multicast range (mainly 230.X.X.X).</p>
  
  <p>In case of TCP/IP which was the case before, I could specify the EntryPoint on the IP specific for certain network card, but here it seems, it's not possible, because I need to send packets on multicast address rather than on my machine's one.</p>
  
  <p>Thank you for any help in advance.</p>