Re: netService:didNotPublish: gets called with NSNetServicesErrorCode -65548
Re: netService:didNotPublish: gets called with NSNetServicesErrorCode -65548
- Subject: Re: netService:didNotPublish: gets called with NSNetServicesErrorCode -65548
- From: Marc Krochmal <email@hidden>
- Date: Thu, 5 Jan 2006 16:26:42 -0800
Hi Martin,
toying around with the NSNetService class with code heavily
inspired from
the Picture Sharing examples, I happen to get an error code in
the delegate method netService:didNotPublish:, that is neither
documented
nor in the header file (NSNetServices.h)
The error dictionary looks the following.
{NSNetServicesErrorCode = -65548; NSNetServicesErrorDomain = 10; }
Does anybody knows, where I find information on this error code and
what it
means ?
This error means that you have a name conflict. The error code is
defined in /usr/include/dns_sd.h.
kDNSServiceErr_NameConflict
What I did:
I published a service, with
NSNetService *netService = [[NSNetService alloc] initWithDomain:@""
type:@"_my_generic_protocol._tcp." name:@"Test" port:4444];
[netService setDelegate:self];
[netService publish];
Service types should be 14 characters or less and should not contain
underscores. For example, you should change it to...
_my-gen-proto._tcp
and ran the code on two systems on the same network. (Note there
were no
services running at the given port)
Shouldn't I get a NSNetServicesCollisionError = -72001 in this
scenario ?
Yes, you should be getting that error and it's a known bug.
Best Regards,
-Marc
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden