• 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
NSHost currentHost always returns localhost?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSHost currentHost always returns localhost?


  • Subject: NSHost currentHost always returns localhost?
  • From: Clyde McQueen <email@hidden>
  • Date: Tue, 4 Sep 2001 08:53:43 -0700

When I try:

NSHost *host = [NSHost currentHost];
NSArray *addresses = [host addresses];
NSArray *names = [host names];

I always get a single address (127.0.0.1) and a single name (localhost). Somehow I thought I'd get more - such as my en0 ip address. Am I missing something?

What's the approved method for getting my en0 address from Cocoa? Should I run ifconfig and grep the results?

/Clyde


  • Prev by Date: Re: ObjC API != Cocoa (Re: Another controversial question)
  • Next by Date: Interface builder and custom palettes ?
  • Previous by thread: Re: Clearing Browser Selection
  • Next by thread: Interface builder and custom palettes ?
  • Index(es):
    • Date
    • Thread