diff -r 59689fbdcf77 -r a9dd5ac5ff11 TCP/TCPConnection.m --- a/TCP/TCPConnection.m Tue Apr 28 10:36:28 2009 -0700 +++ b/TCP/TCPConnection.m Mon May 04 23:21:26 2009 -0700 @@ -8,6 +8,7 @@ #import "TCP_Internal.h" #import "IPAddress.h" +#import "MYBonjourService.h" #import "Logging.h" #import "Test.h" @@ -103,6 +104,15 @@ return [self _initWithAddress: address inputStream: input outputStream: output]; } +- (id) initToBonjourService: (MYBonjourService*)service; +{ + NSNetService *netService = [[NSNetService alloc] initWithDomain: service.domain + type: service.type name: service.name]; + self = [self initToNetService: netService]; + [service release]; + return self; +} + - (id) initIncomingFromSocket: (CFSocketNativeHandle)socket listener: (TCPListener*)listener