title: UDP networking with multiple network
body: <p>I'm currently developing a network application on my machine with 2 network interfaces with the following setup -</p>
  <p><img src="https://i.stack.imgur.com/OyEeM.png" alt="Current network setting" /></p>
  <p>I want to send UDP message by using the first configuration with IP <code>192.168.1.2</code>.</p>
  <pre><code>using (var udpClient = new UdpClient(5556))
  {
      udpClient.Connect(IPAddress.Parse(&quot;192.168.1.2&quot;), 5556);
      // DO STUFF
  }
  </code></pre>
  <p>When I try this I get the following error -</p>
  <blockquote>
  <p>No connection could be made because the target machine actively
  refused it</p>
  </blockquote>
  <p>Strange this is that when I disable my other network that this works perfectly but with 2 connections (LAN &amp; WiFi) it doesn't work anymore...
  I guess that it is sending on wrong adapter?
  Is this because my Default gateway is the same or what am I doing wrong?
  I'm new to developing network-based applications...</p>