title: On Udp -Level :"Only one usage of each socket address is normally permitted"
body: <p>My Scenario is:</p>
  
  <p>There are two pieces of software running on two different machines, one as a server and one as a client. They both use same ports for communicating to each other on UDP level. ( due to the client hardware it's not possible to set the communication on TCP level ( limited memory )). This scenario works already for like 15 years right now.</p>
  
  <p>Now I want to make an emulator for this client, so that I won't have to use the client ( as it needs to be reconfigured everytime I need to debug and to do trouble shooting ). And it's not at the same location as where I'm at.</p>
  
  <p>The thing I did was made a simple client application with a listenerport and a senderport ( same as the sever ) on a virtual network card ( created with de devcon utility )</p>
  
  <p>Now when I run the client I get a SocketException:"Only one usage of each socket address (protocol/network address/port) is normally permitted" ( This is the first thing what happens when I start the client )</p>
  
  <p>This happens at the line where I create the listener : <code>UdpClient listener = new UdpClient(listenPort);</code></p>
  
  <p>In the osi model there is first the network layer(ip addres) and then the port numbers ( with the TCP/UDP layer ).. </p>
  
  <pre><code>7   Application     Process Application     
  6   Presentation
  5   Session
  4   Transport       Host to host          TCP, UDP  Packets
  3   Network         Internet              IP, ICMP  Frames
  2   Data Link       Network Access        ARP       Bits
  1   Physical 
  </code></pre>
  
  <p>The client is not listening on the same networkcard as the server is ( but they are both running on the same computer though ).</p>
  
  <p>The thing I don't get is why this message? Might it be that's it's not possible to create a virtual network card and use the same ports on the same computer? ( As I want to run the client and server on the same computer )</p>
  
  <p>[edit]
  <img src="https://i.stack.imgur.com/Rv9T3.png" alt="Scenario of the setup"></p>
  
  <p>I was just wondering that it might not be possible just as for the reason that it's using one list of porst for all the network cards and therefore it's already being used.
  Then my question is:"how to make a second list of ports to listen too ( as it's different networkcard in the same computer?"</p>
  
  <p>It's almost the same as VirtualBox or VirtualPC makes a new virtual network card. When they are created it's possible to listen on the same port ( although it's a virtualmachine ) but still is the same hardware. Then rises the question on how did they do it?</p>
  
  <p>[/edit]</p>