async def connect(self):
        """ Connect to target. """
        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
        )
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 )
Connect to target.