Hey,
I create an NSNetService:
Which works fine, then in the client side I browse for the service and in the delegate method:
It seems to descover the service perfectly, but for some reason thinks the host name is null and the port is 0 instead of 28496:
Any ideas why this would happen?
Thanks for your time,
-Ross
I create an NSNetService:
Code:
service = [[NSNetService alloc] initWithDomain:@"" type:@"_myprog._tcp" name:@"My Prog Server" port:28496];
[service setDelegate:self];
Which works fine, then in the client side I browse for the service and in the delegate method:
Code:
-( void )netServiceBrowser:( NSNetServiceBrowser * )netServiceBrowser
didFindService:( NSNetService * )netService moreComing:( BOOL )moreComing
{
printf( "desc: %s, name: %s, host: %s, port: %i\n", [[netService description] UTF8String], [[netService name] UTF8String], [[netService hostName] UTF8String], [netService port] );
}
It seems to descover the service perfectly, but for some reason thinks the host name is null and the port is 0 instead of 28496:
desc: <NSNetService 0x44d800> local. _myprog._tcp. My Prog Server, name: My Prog Server, host: (null), port: 0
Any ideas why this would happen?
Thanks for your time,
-Ross