Platforms to show: All Mac Windows Linux Cross-Platform
Back to TXTRecordMBS class.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Network | MBS Network Plugin | 10.1 | ✅ Yes | ✅ Yes | ❌ No | ✅ Yes | All |
Returns a string with the raw bytes inside the TXTRecord which you can pass directly to DNSServiceRegisterMBS.Register() or to DNSServiceRegisterMBS.UpdateRecord().
TXTRecordMBS.ContainsKey(key as string) as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Network | MBS Network Plugin | 10.1 | ✅ Yes | ✅ Yes | ❌ No | ✅ Yes | All |
key: An ASCII string containing the key name.
Returns true if the TXT Record contains the specified key. Otherwise, it returns false.
See also:
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Network | MBS Network Plugin | 10.1 | ✅ Yes | ✅ Yes | ❌ No | ✅ Yes | All |
See also:
TXTRecordMBS.KeyAtIndex(index as Integer) as string
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Network | MBS Network Plugin | 10.1 | ✅ Yes | ✅ Yes | ❌ No | ✅ Yes | All |
index: the index you want in the range from zero to GetCount()-1.
It's also possible to iterate through keys in a TXT record by simply calling KeyAtIndex() repeatedly, beginning with index zero and increasing until lasterror is set to kErrorInvalid.
See also:
TXTRecordMBS.Length as Integer
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Network | MBS Network Plugin | 10.1 | ✅ Yes | ✅ Yes | ❌ No | ✅ Yes | All |
TXTRecordMBS.RemoveValue(key as string)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Network | MBS Network Plugin | 10.1 | ✅ Yes | ✅ Yes | ❌ No | ✅ Yes | All |
key: A key name which exists in the TXTRecord.
Lasterror is kErrorNoError on success or kErrorNoSuchKey if the "key" does not exist in the TXTRecord.
TXTRecordMBS.SetValue(key as string, value as string) as Integer
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Network | MBS Network Plugin | 10.1 | ✅ Yes | ✅ Yes | ❌ No | ✅ Yes | All |
If the "key" already exists in the TXTRecord, then the current value will be replaced with the new value.
Keys may exist in four states with respect to a given TXT record:
- Absent (key does not appear at all)
- Present with no value ("key" appears alone)
- Present with empty value ("key=" appears in TXT record)
- Present with non-empty value ("key=value" appears in TXT record)
For more details refer to "Data Syntax for DNS-SD TXT Records" in
http://files.dns-sd.org/draft-cheshire-dnsext-dns-sd.txt
key: A string which only contains printable ASCII values (&h20-&h7E), excluding '=' (&h3D). Keys should be 8 characters or less.
value: Any binary value. For values that represent textual data, UTF-8 is STRONGLY recommended.
Returns kErrorNoError on success. Returns kErrorInvalid if the "key" string contains illegal characters. Returns kErrorNoMemory if adding this key would exceed the available storage.
The plugin currently does not create keys with empty value. If you need that, please email us.
TXTRecordMBS.Value(key as string) as string
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Network | MBS Network Plugin | 10.1 | ✅ Yes | ✅ Yes | ❌ No | ✅ Yes | All |
key: The ASCII string containing the key name.
Returns an empty string if the key does not exist in this TXT record, or exists with no value (to differentiate between these two cases use ContainsKey()).
See also:
TXTRecordMBS.ValueAtIndex(index as Integer) as string
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Network | MBS Network Plugin | 10.1 | ✅ Yes | ✅ Yes | ❌ No | ✅ Yes | All |
index: the index you want in the range from zero to GetCount()-1.
It's also possible to iterate through values in a TXT record by simply calling ValueAtIndex() repeatedly, beginning with index zero and increasing until lasterror is set to kErrorInvalid.
See also:
The items on this page are in the following plugins: MBS Network Plugin.