TXTRecordGetValuePtr(_:_:_:_:)
Allows you to retrieve the value for a given key from a TXT Record.
Declaration
func TXTRecordGetValuePtr(_ txtLen: UInt16, _ txtRecord: UnsafeRawPointer!, _ key: UnsafePointer<CChar>!, _ valueLen: UnsafeMutablePointer<UInt8>!) -> UnsafeRawPointer!Parameters
- txtLen:
The size of the received TXT Record
- txtRecord:
Pointer to the received TXT Record bytes.
- key:
A null-terminated ASCII string containing the key name.
- valueLen:
On output, will be set to the size of the “value” data.
Return Value
Returns NULL if the key does not exist in this TXT record, or exists with no value (to differentiate between these two cases use TXTRecordContainsKey()). Returns pointer to location within TXT Record bytes if the key exists with empty or non-empty value. For empty value, valueLen will be zero. For non-empty value, valueLen will be length of value data.