qt qxmpp register 使用qxmpp注册

qt qxmpp register 使用qxmpp注册

设置:


configuration.setUseSASLAuthentication(false);

configuration.setUseNonSASLAuthentication(false);

在连接成功后发送流:


voidRegister::connected()
{
qDebug()<<"connectedqqqq";
QStringusername=usernameLine->text();
username=Unit::escapeNode(username);
QStringpassword=passwordLine->text();
QXmppRegisterIqiq;
iq.setType(QXmppIq::Set);
iq.setTo(DOMAIN);
iq.setUsername(username);
iq.setPassword(password);
QXMPPManager::getClient()->sendPacket(iq);
}

你可能感兴趣的:(qt qxmpp register 使用qxmpp注册)