title: How large should my recv buffer be when calling recv in the socket library
body: <p>I have a few questions about the socket library in C.  Here is a snippet of code I'll refer to in my questions.</p>
  
  <pre><code>char recv_buffer[3000];
  recv(socket, recv_buffer, 3000, 0);
  </code></pre>
  
  <ol>
  <li>How do I decide how big to make recv_buffer?  I'm using 3000, but it's arbitrary.  </li>
  <li>what happens if <code>recv()</code> receives a packet bigger than my buffer?  </li>
  <li>how can I know if I have received the entire message without calling recv again and have it wait forever when there is nothing to be received?</li>
  <li>is there a way I can make a buffer not have a fixed amount of space, so that I can keep adding to it without fear of running out of space? maybe using <code>strcat</code> to concatenate the latest <code>recv()</code> response to the buffer?</li>
  </ol>
  
  <p>I know it's a lot of questions in one, but I would greatly appreciate any responses.</p>