* Merged part of Jim Roepke's changes -- the MYAddressLookup fixes and updated iPhone project.
authorJens Alfke <jens@mooseyard.com>
Wed May 06 09:21:57 2009 -0700 (2009-05-06)
changeset 44d8a559a39284
parent 42 c1cf9df64c70
parent 43 aab592ac36fc
child 46 50dc5502ef46
* Merged part of Jim Roepke's changes -- the MYAddressLookup fixes and updated iPhone project.
* Changed API of Jim Roepke's TCPListener improvement (made it a settable property, not a method to override.)
* Added more types to .hgignore.
.hgignore
Bonjour/MYBonjourService.h
Bonjour/MYBonjourService.m
TCP/TCPListener.h
TCP/TCPListener.m
     1.1 --- a/.hgignore	Tue May 05 22:19:33 2009 -0700
     1.2 +++ b/.hgignore	Wed May 06 09:21:57 2009 -0700
     1.3 @@ -8,5 +8,8 @@
     1.4  (*)
     1.5  *.pbxuser
     1.6  *.perspectivev3
     1.7 +*.mode1v3
     1.8 +*.mode2v3
     1.9  *.mpkg
    1.10  *.framework
    1.11 +*.orig
     2.1 --- a/Bonjour/MYAddressLookup.m	Tue May 05 22:19:33 2009 -0700
     2.2 +++ b/Bonjour/MYAddressLookup.m	Wed May 06 09:21:57 2009 -0700
     2.3 @@ -25,7 +25,7 @@
     2.4              return nil;
     2.5          }
     2.6          _hostname = [hostname copy];
     2.7 -        _addresses = [[NSMutableArray alloc] init];
     2.8 +        _addresses = [[NSMutableSet alloc] init];
     2.9      }
    2.10      return self;
    2.11  }
    2.12 @@ -62,10 +62,24 @@
    2.13      if (address) {
    2.14          if (flags & kDNSServiceFlagsAdd) {
    2.15              LogTo(DNS,@"%@ got %@ [TTL = %u]", self, address, ttl);
    2.16 +			NSSet *changedObjects = [NSSet setWithObject:address];
    2.17 +			[self willChangeValueForKey:@"addresses" 
    2.18 +						withSetMutation:NSKeyValueUnionSetMutation 
    2.19 +						   usingObjects:changedObjects]; 
    2.20              [_addresses addObject: address];
    2.21 +			[self didChangeValueForKey:@"addresses" 
    2.22 +					   withSetMutation:NSKeyValueUnionSetMutation 
    2.23 +						  usingObjects:changedObjects]; 
    2.24          } else {
    2.25              LogTo(DNS,@"%@ lost %@ [TTL = %u]", self, address, ttl);
    2.26 +			NSSet *changedObjects = [NSSet setWithObject:address];
    2.27 +			[self willChangeValueForKey:@"addresses" 
    2.28 +						withSetMutation:NSKeyValueMinusSetMutation 
    2.29 +						   usingObjects:changedObjects]; 
    2.30              [_addresses removeObject: address];
    2.31 +			[self didChangeValueForKey:@"addresses" 
    2.32 +					   withSetMutation:NSKeyValueMinusSetMutation 
    2.33 +						  usingObjects:changedObjects]; 
    2.34          }
    2.35          [address release];
    2.36      }
    2.37 @@ -96,7 +110,16 @@
    2.38  
    2.39  
    2.40  - (DNSServiceErrorType) createServiceRef: (DNSServiceRef*)sdRefPtr {
    2.41 -    [_addresses removeAllObjects];
    2.42 +	if ([_addresses count] > 0) {
    2.43 +		NSSet *changedObjects = [NSSet setWithSet:_addresses];
    2.44 +		[self willChangeValueForKey:@"addresses" 
    2.45 +					withSetMutation:NSKeyValueMinusSetMutation 
    2.46 +					   usingObjects:changedObjects]; 
    2.47 +		[_addresses removeAllObjects];
    2.48 +		[self didChangeValueForKey:@"addresses" 
    2.49 +				   withSetMutation:NSKeyValueMinusSetMutation 
    2.50 +					  usingObjects:changedObjects]; 
    2.51 +	}
    2.52      return DNSServiceGetAddrInfo(sdRefPtr,
    2.53                                   kDNSServiceFlagsShareConnection,
    2.54                                   _interfaceIndex, 0,
     3.1 --- a/MYNetwork-iPhone.xcodeproj/project.pbxproj	Tue May 05 22:19:33 2009 -0700
     3.2 +++ b/MYNetwork-iPhone.xcodeproj/project.pbxproj	Wed May 06 09:21:57 2009 -0700
     3.3 @@ -48,6 +48,40 @@
     3.4  		27D915CB0FA8EAD0002B0DEC /* MYBonjourQuery.m in Sources */ = {isa = PBXBuildFile; fileRef = 27D915C60FA8EAD0002B0DEC /* MYBonjourQuery.m */; };
     3.5  		27D915CC0FA8EAD0002B0DEC /* MYBonjourRegistration.m in Sources */ = {isa = PBXBuildFile; fileRef = 27D915C80FA8EAD0002B0DEC /* MYBonjourRegistration.m */; };
     3.6  		280E754F0DD40C5E005A515E /* MainWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 280E754C0DD40C5E005A515E /* MainWindow.xib */; };
     3.7 +		384A72AE0FB00523006A0B19 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; };
     3.8 +		384A72AF0FB00523006A0B19 /* CFNetwork.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 270E9B4E0EE63F8F003F17CA /* CFNetwork.framework */; };
     3.9 +		384A72B00FB00523006A0B19 /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 270E9AE80EE61167003F17CA /* libz.dylib */; };
    3.10 +		384A72B10FB00523006A0B19 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; };
    3.11 +		384A72B20FB00523006A0B19 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2777C78C0F75E141007F8D30 /* Security.framework */; };
    3.12 +		384A72B70FB0062C006A0B19 /* ConcurrentOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = 384A72B60FB0062C006A0B19 /* ConcurrentOperation.m */; };
    3.13 +		384A72B80FB006DF006A0B19 /* IPAddress.m in Sources */ = {isa = PBXBuildFile; fileRef = 270E9AA20EE61113003F17CA /* IPAddress.m */; };
    3.14 +		384A72B90FB006DF006A0B19 /* TCPConnection.m in Sources */ = {isa = PBXBuildFile; fileRef = 270E9AA50EE61113003F17CA /* TCPConnection.m */; };
    3.15 +		384A72BA0FB006DF006A0B19 /* TCPEndpoint.m in Sources */ = {isa = PBXBuildFile; fileRef = 270E9AA70EE61113003F17CA /* TCPEndpoint.m */; };
    3.16 +		384A72BB0FB006DF006A0B19 /* TCPListener.m in Sources */ = {isa = PBXBuildFile; fileRef = 270E9AA90EE61113003F17CA /* TCPListener.m */; };
    3.17 +		384A72BC0FB006DF006A0B19 /* TCPStream.m in Sources */ = {isa = PBXBuildFile; fileRef = 270E9AAB0EE61113003F17CA /* TCPStream.m */; };
    3.18 +		384A72BD0FB006DF006A0B19 /* TCPWriter.m in Sources */ = {isa = PBXBuildFile; fileRef = 270E9AAD0EE61113003F17CA /* TCPWriter.m */; };
    3.19 +		384A72BE0FB006DF006A0B19 /* BLIPConnection.m in Sources */ = {isa = PBXBuildFile; fileRef = 270E9AB20EE61113003F17CA /* BLIPConnection.m */; };
    3.20 +		384A72BF0FB006DF006A0B19 /* BLIPDispatcher.m in Sources */ = {isa = PBXBuildFile; fileRef = 270E9AB40EE61113003F17CA /* BLIPDispatcher.m */; };
    3.21 +		384A72C00FB006DF006A0B19 /* BLIPMessage.m in Sources */ = {isa = PBXBuildFile; fileRef = 270E9AB60EE61113003F17CA /* BLIPMessage.m */; };
    3.22 +		384A72C10FB006DF006A0B19 /* BLIPRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 270E9AB80EE61113003F17CA /* BLIPRequest.m */; };
    3.23 +		384A72C20FB006DF006A0B19 /* BLIPProperties.m in Sources */ = {isa = PBXBuildFile; fileRef = 270E9ABA0EE61113003F17CA /* BLIPProperties.m */; };
    3.24 +		384A72C30FB006DF006A0B19 /* BLIPReader.m in Sources */ = {isa = PBXBuildFile; fileRef = 270E9ABC0EE61113003F17CA /* BLIPReader.m */; };
    3.25 +		384A72C40FB006DF006A0B19 /* BLIPWriter.m in Sources */ = {isa = PBXBuildFile; fileRef = 270E9ABE0EE61113003F17CA /* BLIPWriter.m */; };
    3.26 +		384A72C50FB006DF006A0B19 /* CollectionUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = 270E9AD10EE6111A003F17CA /* CollectionUtils.m */; };
    3.27 +		384A72C60FB006DF006A0B19 /* ExceptionUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = 270E9AD30EE6111A003F17CA /* ExceptionUtils.m */; };
    3.28 +		384A72C70FB006DF006A0B19 /* Logging.m in Sources */ = {isa = PBXBuildFile; fileRef = 270E9AD50EE6111A003F17CA /* Logging.m */; };
    3.29 +		384A72C80FB006DF006A0B19 /* Target.m in Sources */ = {isa = PBXBuildFile; fileRef = 270E9AD70EE6111A003F17CA /* Target.m */; };
    3.30 +		384A72C90FB006DF006A0B19 /* Test.m in Sources */ = {isa = PBXBuildFile; fileRef = 270E9AD90EE6111A003F17CA /* Test.m */; };
    3.31 +		384A72CA0FB006DF006A0B19 /* GTMNSData+zlib.m in Sources */ = {isa = PBXBuildFile; fileRef = 270E9ADD0EE6111A003F17CA /* GTMNSData+zlib.m */; };
    3.32 +		384A72CB0FB006DF006A0B19 /* MYPortMapper.m in Sources */ = {isa = PBXBuildFile; fileRef = 278C1B2C0F9F865800954AE1 /* MYPortMapper.m */; };
    3.33 +		384A72CC0FB006DF006A0B19 /* PortMapperTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 278C1B2D0F9F865800954AE1 /* PortMapperTest.m */; };
    3.34 +		384A72CD0FB006DF006A0B19 /* MYDNSService.m in Sources */ = {isa = PBXBuildFile; fileRef = 27D915BC0FA8EABC002B0DEC /* MYDNSService.m */; };
    3.35 +		384A72CE0FB006DF006A0B19 /* MYAddressLookup.m in Sources */ = {isa = PBXBuildFile; fileRef = 27D915BE0FA8EABC002B0DEC /* MYAddressLookup.m */; };
    3.36 +		384A72CF0FB006DF006A0B19 /* MYBonjourBrowser.m in Sources */ = {isa = PBXBuildFile; fileRef = 27D915C20FA8EAD0002B0DEC /* MYBonjourBrowser.m */; };
    3.37 +		384A72D00FB006DF006A0B19 /* MYBonjourService.m in Sources */ = {isa = PBXBuildFile; fileRef = 27D915C40FA8EAD0002B0DEC /* MYBonjourService.m */; };
    3.38 +		384A72D10FB006DF006A0B19 /* MYBonjourQuery.m in Sources */ = {isa = PBXBuildFile; fileRef = 27D915C60FA8EAD0002B0DEC /* MYBonjourQuery.m */; };
    3.39 +		384A72D20FB006DF006A0B19 /* MYBonjourRegistration.m in Sources */ = {isa = PBXBuildFile; fileRef = 27D915C80FA8EAD0002B0DEC /* MYBonjourRegistration.m */; };
    3.40 +		384A72D30FB006DF006A0B19 /* ConcurrentOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = 384A72B60FB0062C006A0B19 /* ConcurrentOperation.m */; };
    3.41  /* End PBXBuildFile section */
    3.42  
    3.43  /* Begin PBXFileReference section */
    3.44 @@ -127,6 +161,9 @@
    3.45  		27D915C80FA8EAD0002B0DEC /* MYBonjourRegistration.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = MYBonjourRegistration.m; path = Bonjour/MYBonjourRegistration.m; sourceTree = "<group>"; };
    3.46  		280E754C0DD40C5E005A515E /* MainWindow.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MainWindow.xib; sourceTree = "<group>"; };
    3.47  		29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = iPhone/main.m; sourceTree = "<group>"; };
    3.48 +		384A72A90FB0050B006A0B19 /* libMYNetwork.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libMYNetwork.a; sourceTree = BUILT_PRODUCTS_DIR; };
    3.49 +		384A72B50FB0062C006A0B19 /* ConcurrentOperation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ConcurrentOperation.h; sourceTree = "<group>"; };
    3.50 +		384A72B60FB0062C006A0B19 /* ConcurrentOperation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ConcurrentOperation.m; sourceTree = "<group>"; };
    3.51  		8D1107310486CEB800E47090 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
    3.52  /* End PBXFileReference section */
    3.53  
    3.54 @@ -143,6 +180,18 @@
    3.55  			);
    3.56  			runOnlyForDeploymentPostprocessing = 0;
    3.57  		};
    3.58 +		384A72A70FB0050B006A0B19 /* Frameworks */ = {
    3.59 +			isa = PBXFrameworksBuildPhase;
    3.60 +			buildActionMask = 2147483647;
    3.61 +			files = (
    3.62 +				384A72AE0FB00523006A0B19 /* Foundation.framework in Frameworks */,
    3.63 +				384A72AF0FB00523006A0B19 /* CFNetwork.framework in Frameworks */,
    3.64 +				384A72B00FB00523006A0B19 /* libz.dylib in Frameworks */,
    3.65 +				384A72B10FB00523006A0B19 /* UIKit.framework in Frameworks */,
    3.66 +				384A72B20FB00523006A0B19 /* Security.framework in Frameworks */,
    3.67 +			);
    3.68 +			runOnlyForDeploymentPostprocessing = 0;
    3.69 +		};
    3.70  /* End PBXFrameworksBuildPhase section */
    3.71  
    3.72  /* Begin PBXGroup section */
    3.73 @@ -150,6 +199,7 @@
    3.74  			isa = PBXGroup;
    3.75  			children = (
    3.76  				1D6058910D05DD3D006BFB54 /* BLIPEcho.app */,
    3.77 +				384A72A90FB0050B006A0B19 /* libMYNetwork.a */,
    3.78  			);
    3.79  			name = Products;
    3.80  			sourceTree = "<group>";
    3.81 @@ -220,6 +270,8 @@
    3.82  		270E9ACD0EE6111A003F17CA /* MYUtilities */ = {
    3.83  			isa = PBXGroup;
    3.84  			children = (
    3.85 +				384A72B50FB0062C006A0B19 /* ConcurrentOperation.h */,
    3.86 +				384A72B60FB0062C006A0B19 /* ConcurrentOperation.m */,
    3.87  				270E9ACE0EE6111A003F17CA /* MYUtilitiesTest_main.m */,
    3.88  				270E9ACF0EE6111A003F17CA /* MYUtilities_Prefix.pch */,
    3.89  				270E9AD00EE6111A003F17CA /* CollectionUtils.h */,
    3.90 @@ -345,6 +397,16 @@
    3.91  		};
    3.92  /* End PBXGroup section */
    3.93  
    3.94 +/* Begin PBXHeadersBuildPhase section */
    3.95 +		384A72A50FB0050B006A0B19 /* Headers */ = {
    3.96 +			isa = PBXHeadersBuildPhase;
    3.97 +			buildActionMask = 2147483647;
    3.98 +			files = (
    3.99 +			);
   3.100 +			runOnlyForDeploymentPostprocessing = 0;
   3.101 +		};
   3.102 +/* End PBXHeadersBuildPhase section */
   3.103 +
   3.104  /* Begin PBXNativeTarget section */
   3.105  		1D6058900D05DD3D006BFB54 /* MYNetwork-iPhone */ = {
   3.106  			isa = PBXNativeTarget;
   3.107 @@ -363,6 +425,23 @@
   3.108  			productReference = 1D6058910D05DD3D006BFB54 /* BLIPEcho.app */;
   3.109  			productType = "com.apple.product-type.application";
   3.110  		};
   3.111 +		384A72A80FB0050B006A0B19 /* MYNetwork */ = {
   3.112 +			isa = PBXNativeTarget;
   3.113 +			buildConfigurationList = 384A72B40FB00534006A0B19 /* Build configuration list for PBXNativeTarget "MYNetwork" */;
   3.114 +			buildPhases = (
   3.115 +				384A72A50FB0050B006A0B19 /* Headers */,
   3.116 +				384A72A60FB0050B006A0B19 /* Sources */,
   3.117 +				384A72A70FB0050B006A0B19 /* Frameworks */,
   3.118 +			);
   3.119 +			buildRules = (
   3.120 +			);
   3.121 +			dependencies = (
   3.122 +			);
   3.123 +			name = MYNetwork;
   3.124 +			productName = MYNetwork;
   3.125 +			productReference = 384A72A90FB0050B006A0B19 /* libMYNetwork.a */;
   3.126 +			productType = "com.apple.product-type.library.static";
   3.127 +		};
   3.128  /* End PBXNativeTarget section */
   3.129  
   3.130  /* Begin PBXProject section */
   3.131 @@ -383,6 +462,7 @@
   3.132  			projectRoot = "";
   3.133  			targets = (
   3.134  				1D6058900D05DD3D006BFB54 /* MYNetwork-iPhone */,
   3.135 +				384A72A80FB0050B006A0B19 /* MYNetwork */,
   3.136  			);
   3.137  		};
   3.138  /* End PBXProject section */
   3.139 @@ -438,6 +518,42 @@
   3.140  				27D915CA0FA8EAD0002B0DEC /* MYBonjourService.m in Sources */,
   3.141  				27D915CB0FA8EAD0002B0DEC /* MYBonjourQuery.m in Sources */,
   3.142  				27D915CC0FA8EAD0002B0DEC /* MYBonjourRegistration.m in Sources */,
   3.143 +				384A72B70FB0062C006A0B19 /* ConcurrentOperation.m in Sources */,
   3.144 +			);
   3.145 +			runOnlyForDeploymentPostprocessing = 0;
   3.146 +		};
   3.147 +		384A72A60FB0050B006A0B19 /* Sources */ = {
   3.148 +			isa = PBXSourcesBuildPhase;
   3.149 +			buildActionMask = 2147483647;
   3.150 +			files = (
   3.151 +				384A72B80FB006DF006A0B19 /* IPAddress.m in Sources */,
   3.152 +				384A72B90FB006DF006A0B19 /* TCPConnection.m in Sources */,
   3.153 +				384A72BA0FB006DF006A0B19 /* TCPEndpoint.m in Sources */,
   3.154 +				384A72BB0FB006DF006A0B19 /* TCPListener.m in Sources */,
   3.155 +				384A72BC0FB006DF006A0B19 /* TCPStream.m in Sources */,
   3.156 +				384A72BD0FB006DF006A0B19 /* TCPWriter.m in Sources */,
   3.157 +				384A72BE0FB006DF006A0B19 /* BLIPConnection.m in Sources */,
   3.158 +				384A72BF0FB006DF006A0B19 /* BLIPDispatcher.m in Sources */,
   3.159 +				384A72C00FB006DF006A0B19 /* BLIPMessage.m in Sources */,
   3.160 +				384A72C10FB006DF006A0B19 /* BLIPRequest.m in Sources */,
   3.161 +				384A72C20FB006DF006A0B19 /* BLIPProperties.m in Sources */,
   3.162 +				384A72C30FB006DF006A0B19 /* BLIPReader.m in Sources */,
   3.163 +				384A72C40FB006DF006A0B19 /* BLIPWriter.m in Sources */,
   3.164 +				384A72C50FB006DF006A0B19 /* CollectionUtils.m in Sources */,
   3.165 +				384A72C60FB006DF006A0B19 /* ExceptionUtils.m in Sources */,
   3.166 +				384A72C70FB006DF006A0B19 /* Logging.m in Sources */,
   3.167 +				384A72C80FB006DF006A0B19 /* Target.m in Sources */,
   3.168 +				384A72C90FB006DF006A0B19 /* Test.m in Sources */,
   3.169 +				384A72CA0FB006DF006A0B19 /* GTMNSData+zlib.m in Sources */,
   3.170 +				384A72CB0FB006DF006A0B19 /* MYPortMapper.m in Sources */,
   3.171 +				384A72CC0FB006DF006A0B19 /* PortMapperTest.m in Sources */,
   3.172 +				384A72CD0FB006DF006A0B19 /* MYDNSService.m in Sources */,
   3.173 +				384A72CE0FB006DF006A0B19 /* MYAddressLookup.m in Sources */,
   3.174 +				384A72CF0FB006DF006A0B19 /* MYBonjourBrowser.m in Sources */,
   3.175 +				384A72D00FB006DF006A0B19 /* MYBonjourService.m in Sources */,
   3.176 +				384A72D10FB006DF006A0B19 /* MYBonjourQuery.m in Sources */,
   3.177 +				384A72D20FB006DF006A0B19 /* MYBonjourRegistration.m in Sources */,
   3.178 +				384A72D30FB006DF006A0B19 /* ConcurrentOperation.m in Sources */,
   3.179  			);
   3.180  			runOnlyForDeploymentPostprocessing = 0;
   3.181  		};
   3.182 @@ -460,6 +576,31 @@
   3.183  			};
   3.184  			name = Release;
   3.185  		};
   3.186 +		384A72AA0FB0050C006A0B19 /* Debug */ = {
   3.187 +			isa = XCBuildConfiguration;
   3.188 +			buildSettings = {
   3.189 +				ALWAYS_SEARCH_USER_PATHS = NO;
   3.190 +				COPY_PHASE_STRIP = NO;
   3.191 +				GCC_DYNAMIC_NO_PIC = NO;
   3.192 +				GCC_OPTIMIZATION_LEVEL = 0;
   3.193 +				PREBINDING = NO;
   3.194 +				PRODUCT_NAME = MYNetwork;
   3.195 +			};
   3.196 +			name = Debug;
   3.197 +		};
   3.198 +		384A72AB0FB0050C006A0B19 /* Release */ = {
   3.199 +			isa = XCBuildConfiguration;
   3.200 +			buildSettings = {
   3.201 +				ALWAYS_SEARCH_USER_PATHS = NO;
   3.202 +				COPY_PHASE_STRIP = YES;
   3.203 +				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
   3.204 +				GCC_ENABLE_FIX_AND_CONTINUE = NO;
   3.205 +				PREBINDING = NO;
   3.206 +				PRODUCT_NAME = MYNetwork;
   3.207 +				ZERO_LINK = NO;
   3.208 +			};
   3.209 +			name = Release;
   3.210 +		};
   3.211  		C01FCF4F08A954540054247B /* Debug */ = {
   3.212  			isa = XCBuildConfiguration;
   3.213  			baseConfigurationReference = 278C1B330F9F86A100954AE1 /* MYUtilities_Debug.xcconfig */;
   3.214 @@ -494,6 +635,15 @@
   3.215  			defaultConfigurationIsVisible = 0;
   3.216  			defaultConfigurationName = Release;
   3.217  		};
   3.218 +		384A72B40FB00534006A0B19 /* Build configuration list for PBXNativeTarget "MYNetwork" */ = {
   3.219 +			isa = XCConfigurationList;
   3.220 +			buildConfigurations = (
   3.221 +				384A72AA0FB0050C006A0B19 /* Debug */,
   3.222 +				384A72AB0FB0050C006A0B19 /* Release */,
   3.223 +			);
   3.224 +			defaultConfigurationIsVisible = 0;
   3.225 +			defaultConfigurationName = Release;
   3.226 +		};
   3.227  		C01FCF4E08A954540054247B /* Build configuration list for PBXProject "MYNetwork-iPhone" */ = {
   3.228  			isa = XCConfigurationList;
   3.229  			buildConfigurations = (
     4.1 --- a/TCP/TCPListener.h	Tue May 05 22:19:33 2009 -0700
     4.2 +++ b/TCP/TCPListener.h	Wed May 06 09:21:57 2009 -0700
     4.3 @@ -32,6 +32,7 @@
     4.4      CFSocketRef _ipv6socket;
     4.5      
     4.6      NSString *_bonjourServiceType, *_bonjourServiceName;
     4.7 +    NSNetServiceOptions _bonjourServiceOptions;
     4.8      NSNetService *_netService;
     4.9      NSDictionary *_bonjourTXTRecord;
    4.10      BOOL _bonjourPublished;
    4.11 @@ -88,6 +89,9 @@
    4.12      automatically generated if Bonjour is enabled (by setting -bonjourServiceType). */
    4.13  @property (copy) NSString *bonjourServiceName;
    4.14  
    4.15 +/** Options to use when publishing the Bonjour service. */
    4.16 +@property NSNetServiceOptions bonjourServiceOptions;
    4.17 +
    4.18  /** The dictionary form of the Bonjour TXT record: metadata about the service that can be browsed
    4.19      by peers. Changes to this dictionary will be pushed in near-real-time to interested peers. */
    4.20  @property (copy) NSDictionary *bonjourTXTRecord;
     5.1 --- a/TCP/TCPListener.m	Tue May 05 22:19:33 2009 -0700
     5.2 +++ b/TCP/TCPListener.m	Wed May 06 09:21:57 2009 -0700
     5.3 @@ -53,7 +53,7 @@
     5.4  
     5.5  
     5.6  @synthesize delegate=_delegate, port=_port, useIPv6=_useIPv6,
     5.7 -            bonjourServiceType=_bonjourServiceType,
     5.8 +            bonjourServiceType=_bonjourServiceType, bonjourServiceOptions=_bonjourServiceOptions,
     5.9              bonjourPublished=_bonjourPublished, bonjourError=_bonjourError,
    5.10              bonjourService=_netService,
    5.11              pickAvailablePort=_pickAvailablePort;
    5.12 @@ -261,7 +261,7 @@
    5.13              [_netService setDelegate:self];
    5.14              if( _bonjourTXTRecord )
    5.15                  [self _updateTXTRecord];
    5.16 -            [_netService publish];
    5.17 +            [_netService publishWithOptions: _bonjourServiceOptions];
    5.18          } else {
    5.19              self.bonjourError = -1;
    5.20              Warn(@"%@: Failed to create NSNetService",self);