title: Artificially create a connection timeout error
body: <p>I've had a bug in our software that occurs when I receive a connection timeout. These errors are very rare (usually when my connection gets dropped by our internal network). How can I generate this kind of effect artificially so I can test our software? </p>
  
  <p>If it matters the app is written in C++/MFC using CAsyncSocket classes.</p>
  
  <p><strong>Edit:</strong></p>
  
  <p>I've tried using a non-existent host, and I get the socket error:</p>
  
  <blockquote>
    <p>WSAEINVAL (10022) Invalid argument</p>
  </blockquote>
  
  <p>My next attempt was to use <a href="https://stackoverflow.com/questions/100841?sort=oldest#100859">Alexander</a>'s suggestion of connecting to a different port, e.g. 81 (on my own server though). That worked great. Exactly the same as a dropped connection (60 second wait, then error). Thank you!</p>