Platforms to show: All Mac Windows Linux Cross-Platform

Back to DNSServiceRegisterRecordMBS class.

DNSServiceRegisterRecordMBS.RegisterRecord(Flags as Integer, interfaceIndex as Integer, fullname as string, rrtype as Integer, rrClass as Integer, data as string, ttl as Integer) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Network MBS Network Plugin 8.0 ✅ Yes ✅ Yes ❌ No ✅ Yes All
Registers a record on the DNS system.
Example
const kDNSServiceClass_IN = 1
const kDNSServiceType_SRV = 33
const kDNSServiceFlagsShared = &h10
const kDNSServiceFlagsUnique = &h20

flags: Possible values are kDNSServiceFlagsShared or kDNSServiceFlagsUnique (see flag type definitions for details).
interfaceIndex: If non-zero, specifies the interface on which to register the record (the index for a given interface is determined via the if_nametoindex() family of calls.) Passing 0 causes the record to be registered on all interfaces. See "Constants for specifying an interface index" for more details.
fullname: The full domain name of the resource record.
rrtype: The numerical type of the resource record (e.g. kDNSServiceType_PTR, kDNSServiceType_SRV, etc)
rrclass: The class of the resource record (usually kDNSServiceClass_IN)
data: the raw rdata, as it is to appear in the DNS record.
ttl: The time to live of the resource record, in seconds. Pass 0 to use a default value.

Lasterror is set. kDNSServiceErr_NoError on success (any subsequent, asynchronous errors are delivered to the event), otherwise returns an error code indicating the error that occurred (the event is never invoked)

You need to keep this object alive (keep a reference in a window, a module or your app class) so you can receive events.
For interface indexes, please also check NetworkInterfaceMBS class.

Returns false on any error and true on success. Please check lasterror property when false is returned.

DNSServiceRegisterRecordMBS.UpdateRecord(TXTRecord as string, ttl as Integer)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Network MBS Network Plugin 8.0 ✅ Yes ✅ Yes ❌ No ✅ Yes All
Changes the TXT Record.

data is the TXT Record composed of Pascal Strings.
ttl = time to live.

Returns false on any error and true on success. Please check lasterror property when false is returned.

The items on this page are in the following plugins: MBS Network Plugin.


The biggest plugin in space...