• 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: Obtaining local host name
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Obtaining local host name


  • Subject: Re: Obtaining local host name
  • From: Peter Sichel <email@hidden>
  • Date: Tue, 24 Nov 2009 05:02:31 -0500

On Nov 23, 2009, at 4:41 AM, Quinn wrote:

> At 14:31 -0500 22/11/09, Peter Sichel wrote:
>> What confused me is that the LocalHostName may not exist (be null) until you advertise a service, but the default name for your service will use the computer name.  The statement in Sharing Preferences that other hosts on your LAN can access this computer using the LocalHostName is not true in the default case of publishing your own service.
>
> I don't understand this comment.  What test are you running and what is going wrong?

My program Phone Amego has a Caller ID sharing feature that allows a copy of the program running on one host to subscribe to another.  When you turn on "Caller ID Sharing" the program advertises a service.  When you browse for services from another Phone Amego, the service appears with the corresponding "Computer Name."

When the user selects a service and presses "Subscribe", the local instance sends a subscribe request to the remote service that includes the LocalHostName.  The remote service then adds this LocalHostName to its publish list.  Notice it does not browse for the service name, but receives it in a subscribe request from the client.

This is a bug if the LocalHostName is not the same as the Computer Name.  The publish will fail to resolve the corresponding NSNetService.  The Sharing Preferences panel says other hosts on your LAN can access this computer using the LocalHostName, but that's not true in the default case of advertising your own service, you must use the local Computer Name or it won't work.

- Peter

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • RE: Obtaining local host name
      • From: Kenny Millar <email@hidden>
References: 
 >Re: Obtaining local host name (From: Peter Sichel <email@hidden>)
 >Re: Obtaining local host name (From: Peter Sichel <email@hidden>)
 >Re: Obtaining local host name (From: Quinn <email@hidden>)

  • Prev by Date: Re: Obtaining local host name
  • Next by Date: RE: Obtaining local host name
  • Previous by thread: Re: Obtaining local host name
  • Next by thread: RE: Obtaining local host name
  • Index(es):
    • Date
    • Thread