title: C# dropped UDP packets on newly created socket
body: <p>Hey all.  I'm having an issue with c# and it quite possibly may be the debugger but I'm fairly new to c# (not new to c/c++)</p>
  
  <p>There's code below.  Here is the issue I'm having.</p>
  
  <p>I get UDP, not guaranteed delivery, sure. I expect that the occasional packet is dropped on the network or by windows if I'm stuffing the pipe full.  However, the problem I am having is that after I create a new socket, I try and send a packet with 1 byte of data.  This packet is dropped.  I can try and send it twice, it's dropped both times.  However, if I send 1k worth of data, it goes through.  If I create another socket (by clicking the button again), everything works fine.  Now here's the weird thing.  If I stop and restart debugging the project without making any changes to the source, all my packets get sent without problems.  It only seems to happen the on the first run after the project is built.  Anyway, here's the code to reproduce the issue.  After a few hours of searching and reading I'm at a loss.
  edit: Wanted to clarify that I'm using wireshark and can see that the packets are dropped.</p>
  
  <pre><code>    private void button1_Click(object sender, EventArgs e)
      {
          byte[] a = new byte[1] {0x00};
          byte[] b = new byte[1024];
          for(int i = 0; i &lt; 1024; i++)
          {
              b[i] = 0xFF;
          }
  
          IPEndPoint _ipep = new IPEndPoint(IPAddress.Parse("192.168.200.202"),5546);
          Socket _server =  new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
  
          _server.SendTo(a, 1, SocketFlags.None, _ipep);
          _server.SendTo(a, 1, SocketFlags.None, _ipep);
          _server.SendTo(b, 1024, SocketFlags.None, _ipep);
      }
  </code></pre>