title: recv receiving not whole data sometime
body: <p>I have following issue: here is the chunk of code:</p>
  
  <pre><code>void get_all_buf(int sock, std::string &amp; inStr) {
      int n = 1;
      char c;
      char temp[1024*1024]; 
  
      bzero(temp, sizeof(temp));
  
      n = recv(sock, temp, sizeof(temp), 0);
  
      inStr = temp;
  };
  </code></pre>
  
  <p>but sometimes <code>recv</code> returning not whole data (data length always less then <code>sizeof(temp)</code>), only its part. Write side always sends me <strong>whole</strong> data (I got it with sniffer). What matter? Thx.</p>
  
  <p><strong>P.S.</strong> I know, good manner suggests me to check <code>n</code> (<code>if (n &lt; 0) perror ("error while receiving data")</code>), but it doesn't matter now - it's not reason of my problem.</p>
  
  <p><strong>P.S.2</strong> I've forgot - it's blocking socket.</p>