title: How to emulate a forcibly closed TCP connection?
body: <p>How can my test program cause a "connection was forcibly closed" error in the TCP listener it’s connected to?</p>
  
  <p>My understanding is that I’d have to close the connection without following the TCP protocol, namely without sending a "FIN" packet. Can this be done with a standard .NET <code>Socket</code> in TCP mode?</p>
  
  <p>I seem to be able to do this by opening several connections and then terminating the test program, but not in any other way I’ve tried.</p>