diff -r cb9cdf247239 -r aab592ac36fc TCP/TCPListener.m --- a/TCP/TCPListener.m Wed Apr 22 16:45:39 2009 -0700 +++ b/TCP/TCPListener.m Tue May 05 23:24:50 2009 -0700 @@ -24,6 +24,7 @@ @interface TCPListener() - (void) _openBonjour; +- (void) _publishBonjour; - (void) _closeBonjour; @property BOOL bonjourPublished; @property NSInteger bonjourError; @@ -248,6 +249,11 @@ #pragma mark - #pragma mark BONJOUR: +// subclasses can override if they want to call publishWithOptions: instead of publish +- (void) _publishBonjour +{ + [_netService publish]; +} - (void) _openBonjour { @@ -261,7 +267,7 @@ [_netService setDelegate:self]; if( _bonjourTXTRecord ) [self _updateTXTRecord]; - [_netService publish]; + [self _publishBonjour]; } else { self.bonjourError = -1; Warn(@"%@: Failed to create NSNetService",self); @@ -322,7 +328,7 @@ } -- (void)netServiceWillPublish:(NSNetService *)sender +- (void)netServiceDidPublish:(NSNetService *)sender { LogTo(BLIP,@"%@: Advertising %@",self,sender); self.bonjourPublished = YES;