title: Autobahn Asyncio ReconnectingClientFactory
body: <p>I would like to make a <code>ReconnectingClientFactory</code> with asyncio. In particular to handle the case that the server is not available when the client is started in which case the <code>ReconnectingClientFactory</code> will keep trying. That is something that the <code>asyncio.events.create_connection</code> does not do.</p>
  
  <p>Concretely:</p>
  
  <p>The <a href="https://github.com/crossbario/autobahn-python/blob/master/examples/twisted/websocket/echo_variants/client_reconnecting.py" rel="noreferrer">EchoClient</a> example would be fine.
  The crux is how the connection is made.</p>
  
  <pre><code>factory = EchoClientFactory('ws://127.0.0.1:5678')
  connectWS(factory)
  </code></pre>
  
  <p>in the case of the <strong>twisted</strong> version with <code>ReconnectingClientFactory</code>.</p>
  
  <p>Vs</p>
  
  <pre><code>factory = EchoClientFactory(u"ws://127.0.0.1:5678")
  factory.protocol = SecureServerClientProtocol
  
  loop = asyncio.get_event_loop()
  
  # coro = loop.create_connection(factory, 'ws_server', 5678)
  coro = loop.create_connection(factory, '127.0.0.1', 5678)
  
  loop.run_until_complete(asyncio.wait([
      alive(), coro
  ]))
  loop.run_forever()
  loop.close()
  </code></pre>
  
  <p>Or similar with the <a href="https://github.com/crossbario/autobahn-python/blob/master/examples/asyncio/websocket/echo/client.py" rel="noreferrer">asycnio</a> version.</p>
  
  <p>The problem is that in the asyncio version the connection is established by <code>asyncio.events.create_connection</code> which simply fails if the server is not available. </p>
  
  <p>How can I reconcile the two?</p>
  
  <p>Many thanks </p>