title: Determining if existing connections are using TCP KeepAlive under Windows
body: <p>In Windows (Vista and later) is there a way, or a tool, that can aide in determining wether an existing, already established, outgoing TCP connection, was created with the SO_KEEPALIVE option.</p>
  
  <p>On Unix platforms, this can usually be seen using netstat (ie. 'netstat -o' will show a separate column for KEEPALIVE).</p>
  
  <p>Netstat on Windows does not have this feature. Nor does other Microsoft/SysInternals network tools I've tested. </p>
  
  <p>I don't seem to be able to find a tool that can provide this information.</p>
  
  <p>Scenario is: Applications running on a Windows 2008 R2 server needs to have TCP keepalive enabled on all connections it establishes. Some applications does not have the option to enable TCP keepalive, and I need some way of determining if it is enabled by default for these applications.</p>
  
  <p>To be clear: I need some tool, or suggestions on how to program a tool, that shows wether existing winsock connections have TCP keepalive enabled or not. While there are other ways to determine this (such as sniffing the traffic and see if keepalive packets are sent), they all come with uncertainties. Also, we're talking about a lot of servers and a lot of applications.</p>