NSHost currentHost always returns localhost?
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