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

Provider for a single mDNS service More...

#include <qmdnsengine/provider.h>

Inheritance diagram for QMdnsEngine::Provider:

Public Member Functions

 Provider (AbstractServer *server, Hostname *hostname, QObject *parent=0)
 Create a new service provider.
void update (const Service &service)
 Update the service with the provided information.

Detailed Description

This class provide a Service on the local network by responding to the appropriate DNS queries. A hostname is required for creating the SRV record.

The provider needs to be given a reference to the service through the update() method so that it can construct DNS records:

service.setType("_http._tcp.local.");
service.setName("My Service");
service.setPort(1234);
provider.update(service);
Provider for a single mDNS service
Definition provider.h:64
void update(const Service &service)
Update the service with the provided information.
Service available on the local network
Definition service.h:52
void setType(const QByteArray &type)
Set the service type.
void setName(const QByteArray &name)
Set the service name.
void setPort(quint16 port)
Set the service port.

This method can also be used to update the provider's records.

Member Function Documentation

◆ update()

void QMdnsEngine::Provider::update ( const Service & service)
Parameters
serviceupdated service description

This class will not respond to any DNS queries until the hostname is confirmed and this method is called.


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