title: How to disconnect from localhost?
body: <p>Is it possible to disconnect from localhost?</p>
  
  <p>I'm writing a Node.js WebSocket server, and I want to test locally what would happen if the connection closes erroneously.</p>
  
  <p>If I were testing remotely, I'd just Turn Wi-Fi Off, but that doesn't disconnect my connection to localhost.</p>
  
  <p>Thoughts?</p>