• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSNetService addresses returns empty array
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSNetService addresses returns empty array


  • Subject: Re: NSNetService addresses returns empty array
  • From: David Remahl <email@hidden>
  • Date: Thu, 03 Oct 2002 23:58:46 +0200

>> When trying to format the IP address, the addresses returns an empty
>> array. Both the client and server are on the same machine, but i don't
>> think that is the cause as the NSNetService example works fine. The
>> documentation says
>>
>> If no addresses were resolved for the service, the returned NSArray
>> contains zero elements.
>>
>> What would cause the non-resolution of the address when it is on the
>> same machine?
>
> The first thing I'd do is implement the netService:didNotResolve:
> method in your delegate object and find out if you're getting errors on
> the resolve. The error codes should tell you what items are going south
> or whether you've got the service doing something else.

I have similar problems...

I get a new service and ask it to resolve. At that time the addresses array
is empty (as expected). Shortly after I get the delegate message that the
service will resolve, followed by an error. The other service is on the same
machine.

error <NSNetService 0xf8590> local.arpa. _portfolio._tcp. Untitled
Computer*1743622408 <CFDictionary 0xf7320 [0xa01303fc]>{type = immutable,
count = 2, capacity = 2, pairs = (
0 : <CFString 0xa07e37f4 [0xa01303fc]>{contents =
"NSNetServicesErrorCode"} = <CFNumber 0xe68d0 [0xa01303fc]>{value = -72003,
type = kCFNumberSInt32Type}
3 : <CFString 0xa07e3804 [0xa01303fc]>{contents =
"NSNetServicesErrorDomain"} = <CFNumber 0xf83c0 [0xa01303fc]>{value = +10,
type = kCFNumberSInt32Type}
)}

As seen above, the error is Activity In Progress....I am connected to a
network.

The didResolve message never arrives! But if I check the addresses array
after a delay of 10 seconds, the data is there! Odd!

If I am not connected to a network, I don't get notification even of the
local services. Why? There was a message pointing this out a while ago,
which went unanswered...

/ Sincerely, David Remahl
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: NSNetService addresses returns empty array
      • From: j o a r <email@hidden>
  • Prev by Date: Re: Carbon vs Cocoa
  • Next by Date: NSImageCell sub classing
  • Previous by thread: Re: notification on windowing being frontmost.
  • Next by thread: Re: NSNetService addresses returns empty array
  • Index(es):
    • Date
    • Thread