Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Panther and protocolSpecificInformation




Thanks for the reply, Mark:

Marc Krochmal wrote:
Hey Andrew,

protocolSpecificInformation uses a different format than the native TXTRecord NSData, however, it should be easy to take the NSString returned by protocolSpecificInformation and convert it into an NSDictionary of key/value pairs. The following Q&A explains the differences in TXT record formats, although it needs to be updated to discuss the new TXTRecord NSNetService routines.

<http://developer.apple.com/qa/qa2001/qa1306.html>

Does it follow from this that if I [netService setProtocolSpecificInformation: @"txtvers=1\001a\001b=sample\001c=\000\001\002\003" ]

then this will appear on the network as a TXT record formatted as:

09 txtvers=1
01 a
08 b=sample
06 c=\000\001\002\003

and will be unpacked in the reverse way?

If so, I can work with this without too much trouble.

Thanks

Footnote: Just realised a bug in my example: that \001 in the value of C will work as a separator, causing the last entry to appear as two entries:

03 c=\000
02 \002\003

But as long as I deal in ASCII text (255 chars or less), I should be safe, right?

--
Andrew White

--------------------------------------------------------------------------
This email and any attachments may be confidential. They may contain legally
privileged information or copyright material. You should not read, copy,
use or disclose them without authorisation. If you are not an intended
recipient, please contact us at once by return email and then delete both
messages. We do not accept liability in connection with computer virus,
data corruption, delay, interruption, unauthorised access or unauthorised
amendment. This notice should not be removed.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Bonjour-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/bonjour-dev/email@hidden

This email sent to email@hidden
References: 
 >Re: Panther and protocolSpecificInformation (From: Andrew White <email@hidden>)
 >Re: Panther and protocolSpecificInformation (From: Marc Krochmal <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.