title: How to increase the TCP "receive window"on the iPhone
body: <p>I only seem to be able to receive a max stream size of 8k bytes.  It craps out after that.  How can I enlarge this?  thx</p>
  
  <pre><code>    host = gethostbyname("xxx"); 
  
      memcpy(&amp;(sin.sin_addr), host-&gt;h_addr, host-&gt;h_length);
      sin.sin_family = host-&gt;h_addrtype;
      sin.sin_port = htons(4000);
  
      s = socket(AF_INET, SOCK_STREAM, 0);
      hConnect = connect(s, (struct sockaddr*)&amp;sin, sizeof(sin));
  
  
      char buffer[8000];// tried setting higher,  doesn't change anything
      memset(buffer, '\0', 8000);
      recv(s, buffer, sizeof(buffer), 0); // &lt;------8k max,  need 64k
  </code></pre>