August 2011
Intermediate to advanced
552 pages
23h 48m
English
Besides the standard information for a service (host, port, name), the DNS record used to publish the services has a TXT record. This is a place where you can put any sort of data that clients might want to know about. For example, your chatter server might want to advertise the number of users already connected. It could use the TXT record to do this. NSNetService has a method that would be used on the server side:
- (BOOL) setTXTRecordData: (NSData *) data;On the client side, you would ask the NSNetService for the data using:
- (NSData *)TXTRecordData;
Of course, the server might change the TXT record. (For example, if more people subscribe, your chatterd server would want to change the advertised number of ...
Read now
Unlock full access