title: What is a good buffer size for socket programming?
body: <p>We are using .Net and sockets. The server is using the <code>Socket.Sender(bytes[])</code> method so it just sends the entire payload. On the other side we are clients consuming the data. <code>Socket.Receive(buffer[])</code>. In all the examples from Microsoft (and others) they seem to stick with a buffer size of 8192. We have used this size but every now and then we are sending data down to the clients that exceeds this buffer size.</p>
  
  <p>Is there a way of determining how much data the server's sent method sent us? What is the best buffer size?</p>