The QXmppStunMessage class represents a STUN message. More...
#include <QXmppStun.h>
Public Member Functions | |
QXmppStunMessage () | |
Constructs a new QXmppStunMessage. | |
QByteArray | id () const |
void | setId (const QByteArray &id) |
quint16 | type () const |
void | setType (quint16 type) |
QByteArray | encode (const QString &password=QString()) const |
bool | decode (const QByteArray &buffer, const QString &password=QString(), QStringList *errors=0) |
QString | toString () const |
Static Public Member Functions | |
static quint16 | peekType (const QByteArray &buffer) |
Public Attributes | |
int | errorCode |
QString | errorPhrase |
quint32 | priority |
QByteArray | iceControlling |
QByteArray | iceControlled |
QHostAddress | mappedHost |
quint16 | mappedPort |
QHostAddress | otherHost |
quint16 | otherPort |
QHostAddress | xorMappedHost |
quint16 | xorMappedPort |
QString | software |
QString | username |
bool | useCandidate |
The QXmppStunMessage class represents a STUN message.
bool QXmppStunMessage::decode | ( | const QByteArray & | buffer, | |
const QString & | password = QString() , |
|||
QStringList * | errors = 0 | |||
) |
Decodes a QXmppStunMessage and checks its integrity using the given password.
buffer | ||
password |
ICE-CONTROLLING
ICE-CONTROLLED
QByteArray QXmppStunMessage::encode | ( | const QString & | password = QString() |
) | const |
Encodes the current QXmppStunMessage, optionally calculating the message integrity attribute using the given password.
password |
quint16 QXmppStunMessage::peekType | ( | const QByteArray & | buffer | ) | [static] |
If the given packet looks like a STUN message, returns the message type, otherwise returns 0.
buffer |