title: Detecting eventmachine disconnections and testing for reconnect
body: <p>I'm trying to build a system ontop of event machine that will detect when a TCP connection has failed and will test to see if a reconnect can be fired. I've gone through all of the eventmachine code but can't seem to find where there is a callback for the connection either timing out in action or in reconnection. Even though I've set the times in the code, there is no callback on the pending connect, and if I try to re fire reconnect I get no feedback as to whether the connection has succeeded or failed. I'm using it to connect to effectively a telnet interface.</p>
  
  <pre><code>EventMachine.run do
  c = EventMachine.connect "10.8.1.99",5000,ConnectInterface
  c.pending_connect_timeout = 10
  </code></pre>
  
  <p>end</p>
  
  <p>Any help would be greatly appreciated.</p>