33 QXmppStunTransaction(
const QXmppStunMessage &request, QObject *parent);
34 QXmppStunMessage request()
const;
35 QXmppStunMessage response()
const;
39 void writeStun(
const QXmppStunMessage &request);
42 void readStun(
const QXmppStunMessage &response);
48 QXmppStunMessage m_request;
49 QXmppStunMessage m_response;
59 QXmppIceTransport(QObject *parent =
nullptr);
60 ~QXmppIceTransport()
override;
63 virtual qint64 writeDatagram(
const QByteArray &data,
const QHostAddress &host, quint16 port) = 0;
66 virtual void disconnectFromHost() = 0;
70 void datagramReceived(
const QByteArray &data,
const QHostAddress &host, quint16 port);
77class QXMPP_EXPORT QXmppTurnAllocation :
public QXmppIceTransport
82 enum AllocationState {
89 QXmppTurnAllocation(QObject *parent =
nullptr);
90 ~QXmppTurnAllocation()
override;
92 QHostAddress relayedHost()
const;
93 quint16 relayedPort()
const;
94 AllocationState state()
const;
96 void setServer(
const QHostAddress &host, quint16 port = 3478);
97 void setUser(
const QString &user);
98 void setPassword(
const QString &password);
101 qint64 writeDatagram(
const QByteArray &data,
const QHostAddress &host, quint16 port)
override;
111 void connectToHost();
112 void disconnectFromHost()
override;
117 void refreshChannels();
118 void transactionFinished();
119 void writeStun(
const QXmppStunMessage &message);
122 void handleDatagram(
const QByteArray &datagram,
const QHostAddress &host, quint16 port);
123 void setState(AllocationState state);
127 QTimer *m_channelTimer;
130 QHostAddress m_relayedHost;
131 quint16 m_relayedPort;
132 QHostAddress m_turnHost;
136 typedef QPair<QHostAddress, quint16> Address;
137 quint16 m_channelNumber;
138 QMap<quint16, Address> m_channels;
145 AllocationState m_state;
146 QList<QXmppStunTransaction *> m_transactions;
152class QXMPP_EXPORT QXmppUdpTransport :
public QXmppIceTransport
157 QXmppUdpTransport(QUdpSocket *socket, QObject *parent =
nullptr);
158 ~QXmppUdpTransport()
override;
161 qint64 writeDatagram(
const QByteArray &data,
const QHostAddress &host, quint16 port)
override;
164 void disconnectFromHost()
override;
170 QUdpSocket *m_socket;
The QXmppJingleCandidate class represents a transport candidate as specified by XEP-0176: Jingle ICE-...
Definition: QXmppJingleData.h:278
The QXmppLoggable class represents a source of logging messages.
Definition: QXmppLogger.h:110