title: Close all underlying network connections
body: <p><strong>Background:</strong><br/>
  I have some code that is connecting to a server to pull data.  However, at some point the program got into a state where it was failing to connect to the server. The problem we were seeing is that the server was continually timing out when we were attempting to reconnect.</p>
  
  <p><em>Plugin:</em> <br/>
  We have our timeout set to the default values used by our network plugin (a Thrift plugin).  These values are 100k millisecond timeout and 300k millisecond readwrite timeout.  Not exactly short timeouts.  Also, every time we attempt to reconnect, we recreate the plugin's class, so whatever values it's setting internally are reset each time we attempt to reconnect.  I believe timeouts are not the issue. And I believe the plugin is not the issue.</p>
  
  <p><em>Network:</em><br/>
  We saw these repeated timeouts occur for half an hour.  When we restarted the service (not the machine), it immediately came back online.  So, I know it wasn't a network issue.  That leads me to believe it's something in our code that is getting into an invalid network state.  Also, it is a state that we can't control, since our plugin hides all of the good network stuff from us--including timeouts, keepalive flags, and connection groups (among others).  We basically don't have access to the HTTPWebReqest member.</p>
  
  <p><strong>Question:</strong><br/>
  When our network settings get into this state, we attempt to close all connections and reconnect to the server.  The goal was to kill all the active connections in order to reset whatever state we got into.  However, when we attempt to reconnect, we're getting timeouts on our reconnect.</p>
  
  <p>Somehow (probably due to the KeepAlive and TCP Pipelining, which we can't control), the network connections remain open even though we have closed all connections.  This leaves us in a bad state and prevents us from cycling our connections to the server.</p>
  
  <p><em>The question:</em><br/>
  How can I kill all underlying connections to a server in order to force a reconnect?</p>