async def _async_connect(self):  # pragma: no cover
        """ connect and authenticate to the XMPP server. Async mode. """
        try:
            self.conn_coro = self.client.connected()
            aenter = type(self.conn_coro).__aenter__(self.conn_coro)
            self.stream = await aenter
            logger.info(f"Agent {str(self.jid)} connected and authenticated.")
        except aiosasl.AuthenticationFailure:
            raise AuthenticationFailure(
                "Could not authenticate the agent. Check user and password or use auto_register=True")
async def _async_connect ( self ) : try : self . conn_coro = self . client . connected ( ) aenter = type ( self . conn_coro ) . __aenter__ ( self . conn_coro ) self . stream = await aenter logger . info ( f"Agent {str(self.jid)} connected and authenticated." ) except aiosasl . AuthenticationFailure : raise AuthenticationFailure ( "Could not authenticate the agent. Check user and password or use auto_register=True" )
connect and authenticate to the XMPP server. Async mode.