Kaydet (Commit) b44ee0a0 authored tarafından siqi's avatar siqi

fix for OSXnetwork service

Change-Id: I62037134ad919dec0ea036a1660ce28426033a2d
üst 96c41351
...@@ -17,24 +17,24 @@ ...@@ -17,24 +17,24 @@
- (void) publishImpressRemoteServiceOnLocalNetworkWithName:(NSString *)sName - (void) publishImpressRemoteServiceOnLocalNetworkWithName:(NSString *)sName
{ {
netService = [[NSNetService alloc] initWithDomain:@"local" type:@kREG_TYPE name:sName port:1599]; netService = [[NSNetService alloc] initWithDomain:@"local" type:"_impressremote._tcp" name:sName port:1599];
if (netService != nil) if (netService != nil)
{ {
[netService setDelegate:self]; [netService setDelegate:self];
[netService scheduleInRunLoop:[NSRunLoop currentRunLoop] forMode:NSDefaultRunLoopMode]; [netService scheduleInRunLoop:[NSRunLoop currentRunLoop] forMode:NSDefaultRunLoopMode];
[netService publish]; [netService publish];
} }
} }
-(void)netService:(NSNetService *)aNetService -(void)netService:(NSNetService *)aNetService
didNotPublish:(NSDictionary *)dict { didNotPublish:(NSDictionary *)dict {
NSLog(@"Service %p did not publish: %@", aNetService, dict); NSLog(@"Service %p did not publish: %@", aNetService, dict);
} }
- (void)dealloc { - (void)dealloc {
[netService stop]; [netService stop];
[netService release]; [netService release];
[super dealloc]; [super dealloc];
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment