code: async def connect(self):
          
          self.tls_context = None
  
          if self.tls:
              self.tls_context = self.create_tls_context()
  
          (self.reader, self.writer) = await asyncio.open_connection(
              host=self.hostname,
              port=self.port,
              local_addr=self.source_address,
              ssl=self.tls_context,
              loop=self.eventloop
          )
docs: Connect to target.