code: def connection_made(self, chan):
          
          self._chan = chan
  
          # Run REPL interface.
          f = asyncio.ensure_future(self.cli.run_async())
  
          # Close channel when done.
          def done(_):
              chan.close()
              self._chan = None
          f.add_done_callback(done)
docs: Client connected, run repl in coroutine.