2 // ITServiceBrowserDelegate.m
5 // Created by Alexander Strange on Sat Mar 15 2003.
6 // Copyright (c) 2003 __MyCompanyName__. All rights reserved.
9 #import "ITServiceBrowserDelegate.h"
10 #import "ITInetSocket.h"
11 #import <Foundation/NSNetServices.h>
13 @implementation ITServiceBrowserDelegate
14 - (id) initWithDelegate:(id)_delegate
16 if (self = [super init])
18 delegate = [_delegate retain];
28 - (void)netServiceBrowser:(NSNetServiceBrowser *)aNetServiceBrowser didFindService:(NSNetService *)aNetService moreComing:(BOOL)moreComing
35 NSLog(@"Nothing more coming");
36 [[aNetService retain] autorelease];
37 [aNetServiceBrowser stop];
38 [aNetServiceBrowser release];
41 sock = [[ITInetSocket alloc] initWithDelegate:d];
42 NSLog(@"Detected a service! name %@ type %@",[aNetService name],[aNetService type]);
43 arr = [aNetService addresses];
45 [sock connectWithSockaddrArray:arr];
47 NSLog(@"There are no sockaddrs for this service!");