Loading...
Searching...
No Matches
QXmppIceComponent Class Reference

The QXmppIceComponent class represents a piece of a media stream requiring a single transport address, as defined by RFC 5245 (Interactive Connectivity Establishment). More...

`#include <QXmppStun.h>`

Inheritance diagram for QXmppIceComponent:
[legend]
Collaboration diagram for QXmppIceComponent:
[legend]

## Public Member Functions

| ~QXmppIceComponent () override
int | component () const
bool | isConnected () const
QList< QXmppJingleCandidate > | localCandidates () const
Q_SLOT void | close ()
Q_SLOT void | connectToHost ()
Q_SLOT qint64 | sendDatagram (const QByteArray &datagram)
Q_SIGNAL void | connected ()
| This signal is emitted once ICE negotiation succeeds.
Q_SIGNAL void | datagramReceived (const QByteArray &datagram)
| This signal is emitted when a data packet is received.
Q_SIGNAL void | gatheringStateChanged ()
| This signal is emitted when the gathering state of local candidates changes.
Q_SIGNAL void | localCandidatesChanged ()
| This signal is emitted when the list of local candidates changes.
Public Member Functions inherited from QXmppLoggable
| QXmppLoggable (QObject *parent=nullptr)
Q_SIGNAL void | setGauge (const QString &gauge, double value)
| Sets the given gauge to value.
Q_SIGNAL void | logMessage (QXmppLogger::MessageType type, const QString &msg)
| This signal is emitted to send logging messages.
Q_SIGNAL void | updateCounter (const QString &counter, qint64 amount=1)
| Updates the given counter by amount.

## Static Public Member Functions

static QList< QHostAddress > | discoverAddresses ()
static QList< QUdpSocket * > | reservePorts (const QList< QHostAddress > &addresses, int count, QObject *parent=nullptr)

## Friends

class | QXmppIceComponentPrivate
class | QXmppIceConnection

## Additional Inherited Members

Protected Member Functions inherited from QXmppLoggable
void | debug (const QString &message)
| Logs a debugging message.
void | info (const QString &message)
| Logs an informational message.
void | warning (const QString &message)
| Logs a warning message.
void | logReceived (const QString &message)
| Logs a received packet.
void | logSent (const QString &message)
| Logs a sent packet.

## Detailed Description

The QXmppIceComponent class represents a piece of a media stream requiring a single transport address, as defined by RFC 5245 (Interactive Connectivity Establishment).

## Constructor & Destructor Documentation

## ~QXmppIceComponent()

QXmppIceComponent::~QXmppIceComponent | ( |  | ) |

override

Destroys the QXmppIceComponent.

## Member Function Documentation

## close()

void QXmppIceComponent::close | ( |  | ) |

Stops ICE connectivity checks and closes the underlying sockets.

## component()

int QXmppIceComponent::component | ( |  | ) | const

Returns the component id for the current socket, e.g. 1 for RTP and 2 for RTCP.

## connectToHost()

void QXmppIceComponent::connectToHost | ( |  | ) |

Starts ICE connectivity checks.

## discoverAddresses()

QList< QHostAddress > QXmppIceComponent::discoverAddresses | ( |  | ) |

static

Returns the list of local network addresses.

## isConnected()

bool QXmppIceComponent::isConnected | ( |  | ) | const

Returns true if ICE negotiation completed, false otherwise.

## localCandidates()

QList< QXmppJingleCandidate > QXmppIceComponent::localCandidates | ( |  | ) | const

Returns the list of local candidates.

## reservePorts()

QList< QUdpSocket * > QXmppIceComponent::reservePorts | ( | const QList< QHostAddress > & | addresses,
|  | int | count,
|  | QObject * | parent = nullptr )

static

Tries to bind count UDP sockets on each of the given addresses.

The port numbers are chosen so that they are consecutive, starting at an even port. This makes them suitable for RTP/RTCP sockets pairs.

Parameters

  addresses | The network address on which to bind the sockets.
  count | The number of ports to reserve.
  parent | The parent object for the sockets.

## sendDatagram()

qint64 QXmppIceComponent::sendDatagram | ( | const QByteArray & | datagram | ) |

Sends a data packet to the remote party.

Parameters

  datagram |

The documentation for this class was generated from the following files:

- QXmppStun.h
- QXmppStun.cpp