title: Is there an equivalent to TCP_CORK in Winsock?
body: <p>In many UNIX TCP implementations, a socket option <a href="http://linux.die.net/man/7/tcp" rel="noreferrer"><code>TCP_CORK</code></a> is provided which allows the caller to bypass <a href="http://en.wikipedia.org/wiki/Nagle%27s_algorithm" rel="noreferrer">Nagle's algorithm</a> and explicitly specify when to send a physical packet. Is there an equivalent feature in Windows (Winsock)?</p>
  
  <blockquote>
    <p><strong>TCP_CORK</strong> (since Linux 2.2)</p>
    
    <blockquote>
      <p>If set, don't send out partial frames. All queued partial frames are sent when the option is cleared again. This is useful for prepending headers before calling sendfile(2), or for throughput optimization. As currently implemented, there is a 200 millisecond ceiling on the time for which output is corked by TCP_CORK. If this ceiling is reached, then queued data is automatically transmitted. This option can be combined with TCP_NODELAY only since Linux 2.5.71. This option should not be used in code intended to be portable. </p>
    </blockquote>
  </blockquote>
  
  <p>(I'm aware of <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/ms738596%28v=vs.85%29.aspx" rel="noreferrer"><code>TCP_NODELAY</code></a>, but this isn't what I need; I still want multiple writes to be accumulated in the send buffer, and then trigger the TCP stack when I'm ready for it to send a physical packet.)</p>