QMdnsEngine 0.2.1
Multicast DNS library for Qt applications
Loading...
Searching...
No Matches
QMdnsEngine::Prober Class Reference

Prober to confirm that a record is unique More...

#include <qmdnsengine/prober.h>

Inheritance diagram for QMdnsEngine::Prober:

Signals

void nameConfirmed (const QByteArray &name)
 Indicate that the name has been confirmed unique.

Public Member Functions

 Prober (AbstractServer *server, const Record &record, QObject *parent=0)
 Create a new prober.

Detailed Description

Before responding to queries for a record, its uniqueness on the network must be confirmed. This class takes care of probing for existing records that match and adjusts the record's name until a unique one is found.

For example, to probe for a SRV record:

record.setName("My Service._http._tcp.local.");
record.setType(QMdnsEngine::SRV);
record.setPort(1234);
record.setTarget(hostname.hostname());
QMdnsEngine::Prober prober(&server, record);
connect(&prober, &QMdnsEngine::Prober::nameConfirmed, [](const QByteArray &name) {
qDebug() << "Name confirmed:" << name;
});
Prober to confirm that a record is unique
Definition prober.h:63
void nameConfirmed(const QByteArray &name)
Indicate that the name has been confirmed unique.
DNS record.
Definition record.h:60
void setTarget(const QByteArray &target)
Set the target for the record.
void setType(quint16 type)
Set the type of the record.
void setPort(quint16 port)
Set the port for the record.
void setName(const QByteArray &name)
Set the name of the record.

Member Function Documentation

◆ nameConfirmed

void QMdnsEngine::Prober::nameConfirmed ( const QByteArray & name)
signal
Parameters
namethat was confirmed to be unique

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