title: Who's setting TCP window size down to 0, Indy or Windows?
body: <p>We have an application server which have been observed sending headers with TCP window size 0 at times when the network had congestion (at a client's site).  </p>
  
  <p>We would like to know if it is Indy or the underlying Windows layer that is responsible for adjusting the TCP window size down from the nominal 64K in adaptation to the available throughput.<br>
  And we would be able to act upon it becoming 0 (nothing gets send, users wait => no good).  </p>
  
  <p>So, any info, link, pointer to Indy code are welcome...  </p>
  
  <p>Disclaimer: I'm not a network specialist. Please keep the answer understandable for the average me ;-)<br>
  Note: it's Indy9/D2007 on Windows Server 2003 SP2.  </p>
  
  <p>More gory details:<br>
  The TCP zero window cases happen on the middle tier talking to the DB server.<br>
  It happens at the same moments when end users complain of slowdowns in the client application (that's what triggered the network investigation).<br>
  2 major Network issues causing bottlenecks have been identified.<br>
  The TCP zero window happened when there was network congestion, but may or may not be caused by it.<br>
  We want to know when that happen and have a way to do something (logging at least) in our code.  </p>
  
  <p><strong>So the core question is who sets the window size to 0 and where?<br>
  Where to hook (in Indy?) to know when that condition occurs?</strong></p>