code: async def connect(self):
          
          tcp_client = TCPTransport(self.frame_received_cb, self.connection_closed_cb)
          self.transport, _ = await self.loop.create_connection(
              lambda: tcp_client,
              host=self.config.host,
              port=self.config.port,
              ssl=self.create_ssl_context())
          self.connected = True
docs: Connect to gateway via SSL.