Re: Might be a stupid queston... but
Subject : Re: Might be a stupid queston... but
From: "John C. Randolph" <email@hidden >
Date: Sun, 5 Dec 2004 04:04:32 -0800
Delivered-to: email@hidden
Delivered-to: email@hidden
On Dec 4, 2004, at 9:45 PM, Kodex wrote:
How does one get his own IP address with cocoa?
NSArray *myAddresses = [[NSHost currentHost] addresses];
Will give you an array of all the IP addresses for the machine your app
is running on. You'll get these as NSStrings.
-jcr
John C. Randolph <email@hidden> (408) 974-8819
Sr. Cocoa Software Engineer,
Apple Worldwide Developer Relations
http://developer.apple.com/cocoa/index.html
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden
This email sent to email@hidden
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2007 Apple Inc. All rights reserved.