* MYBonjourBrowser: Added delegate (no methods for it yet, just for client use.)
* MYBonjourRegistration: Added +canonicalFormOfTXTRecordDictionary:.
* MYBonjourService: Added back-reference to browser.
* IPAddress: Added conversions to/from struct sockaddr.
5 // Created by Jens Alfke on 4/24/09.
6 // Copyright 2009 Jens Alfke. All rights reserved.
9 #import "MYDNSService.h"
10 @class MYBonjourService;
13 /** An asynchronous DNS address lookup. Supports both Bonjour services and traditional hostnames. */
14 @interface MYAddressLookup : MYDNSService
16 MYBonjourService *_service;
18 UInt16 _interfaceIndex;
19 NSMutableSet *_addresses;
21 CFAbsoluteTime _expires;
24 /** Initializes the lookup with a DNS hostname.
25 (If you've got a Bonjour service already, as a MYBonjourService object, it's more convenient
26 to access its addressLookup property instead of creating your own instance.) */
27 - (id) initWithHostname: (NSString*)hostname;
29 @property (readonly, copy) NSString *hostname;
31 /** The port number; this will be copied into the resulting IPAddress objects.
32 Defaults to zero, but you can set it before calling -start. */
33 @property UInt16 port;
35 /** The index of the network interface to use, or zero (the default) for any interface.
36 You usually don't need to set this. */
37 @property UInt16 interfaceIndex;
39 /** The resulting address(es) of the host, as HostAddress objects. */
40 @property (readonly) NSSet *addresses;
42 /** How much longer the addresses will remain valid.
43 If the value is zero, the addresses are no longer valid, and you should instead
44 call -start again and wait for the 'addresses' property to update.
45 If you set the service to continuous mode, addresses will never expire since the
46 query will continue to update them. */
47 @property (readonly) NSTimeInterval timeToLive;
51 - (id) _initWithBonjourService: (MYBonjourService*)service;
52 - (void) _serviceGotResponse;