title: Does C# UDP socket's ReceiveBufferSize applies to size of datagrams or size of the message queue?
body: <p>I have a C# UDP socket hosted on azure cloud that receives UDP datagrams using <code>UdpClient.receive</code>. There could be thousands of clients sending messages to the socket concurrently and each client sends datagrams with a size of around 1Kb.</p>
  
  <p>I am confused to whether the <code>ReceiveBufferSize</code> applies to the size of each datagram or if it sets the size of the receive queue underneath? By receive queue, I mean the queue that is used by the .NET runtime to enqueue datagrams from different clients that hasn't been read by <code>UdpClient.receive</code> yet.</p>
  
  <p>I read in some posts that the <code>ReceiveBufferSize</code> only applies to the size of individual datagrams, if that's the case, how would we set the size of the receive queue underneath?</p>
  
  <p>I have set the <code>ReceiveBufferSize</code> to 65Kb. If the <code>ReceiveBufferSize</code> applies to the queue size under the hood, and each client sends a 1Kb datagram at the same time, does this mean the socket can only handle data from 65 clients? If there are more clients sending at the same time the buffer overflows and datagrams are lost?</p>