Poco::DNSSD

class DNSSDResponderImpl

File Information

Library: DNSSD
Package: Core
Header: Poco/DNSSD/DNSSDResponderImpl.h

Description

DNSSDResponderImpl subclasses implement the actual binding to the underlying DNSSD engine (e.g., Bonjour or Avahi).

Inheritance

Known Derived Classes: Poco::DNSSD::Avahi::AvahiResponderImpl, Poco::DNSSD::Bonjour::BonjourResponderImpl

Member Summary

Member Functions: addRecord, browser, registerService, removeRecord, start, stop, unregisterService, updateRecord

Constructors

DNSSDResponderImpl protected

DNSSDResponderImpl();

Destructor

~DNSSDResponderImpl virtual

virtual ~DNSSDResponderImpl();

Destroys the DNSSDResponderImpl.

Member Functions

addRecord virtual

virtual RecordHandle addRecord(
    ServiceHandle serviceHandle,
    const Record & record
) = 0;

Add a record to a registered service. The name of the record will be the same as the registered service's name.

The record can later be updated or deregistered by passing the RecordHandle returned by this function to updateRecord() or removeRecord().

browser virtual

virtual DNSSDBrowser & browser() = 0;

Returns the DNSSDBrowser, which is used to discover and resolve services and domains.

registerService virtual

virtual ServiceHandle registerService(
    const Service & service,
    int options
) = 0;

Registers a service.

Service registration will be asynchronously. When the service has been registered successfully, a serviceRegistered event will be fired. Otherwise, a ServiceRegistrationFailed event will be fired.

Returns a ServiceHandle that can later be used to unregister the service, or to add DNS records to the service.

removeRecord virtual

virtual void removeRecord(
    ServiceHandle serviceHandle,
    RecordHandle & recordHandle
) = 0;

Remove a registered resource record. The record must either be: a record added to a registered service via addRecord().

The RecordHandle is invalidated.

start virtual

virtual void start() = 0;

Starts the responder.

Must be called before services can be registered or before browsing for domains and services.

stop virtual

virtual void stop() = 0;

Stops the responder.

unregisterService virtual

virtual void unregisterService(
    ServiceHandle & serviceHandle
) = 0;

Unregisters the service specified by serviceHandle.

The ServiceHandle is invalidated.

updateRecord virtual

virtual void updateRecord(
    ServiceHandle serviceHandle,
    RecordHandle recordHandle,
    const Record & record
) = 0;

Update a registered resource record. The record must either be:

  • the primary txt record of a service registered via registerService() (if recordHandle is a null handle), or
  • a record added to a registered service via addRecord().
Securely control IoT edge devices from anywhere   Connect a Device