title: Starting a tls communication with python asyncio
body: <p>I have some python code snippet that uses <code>asyncio</code> and initiates a "plain" connection:</p>
  
  <pre><code>loop = asyncio.get_event_loop()
  coro = loop.create_connection(lambda: MyCustomClassProtocol(loop), sock=client_socket)
  loop.run_until_complete(coro)
  </code></pre>
  
  <p>The point is my plain connection switches to a tls one once some exchanges have happened. In the traditional way one would do this:</p>
  
  <pre><code>ssl_sock = ssl.wrap_socket(client_socket, do_handshake_on_connect=False)
  ssl_sock.do_handshake()
  </code></pre>
  
  <p>But I don't really know how I can handle this with <code>asyncio</code>. My <code>data_received</code> method receives the ciphered content though, so I guess I can do something to decipher it, but I cannot figure it out.</p>