I have an iPhone app that is a client for an existing server application.
I am using the following code to connect, and this code was working fine. Today I started work on the project, and something odd is happening.
When I click "Connect" NSHost takes about 30-45 seconds to resolve and connect to the host. Once the connection is estab...
I have some code that was written for Mac OS X and it makes a lot of use of the NSHost class. During my efforts to bring this code to the iPhone, I discovered that NSHost isn't available in the iPhone SDK, and should instead be replaced with NSStream and the related networking classes.
Anywho, I've been working on it to port it over to ...
Hi,
I want to find IP address in an application. I am able to find it. But, problem is, it works fins in iphone os 2.0 or so. But, in iphone os 3.0 it is giving me a warning:
warning: no '+currentHost' method found
warning: (Messages without a matching method signature)
I am using this code, and it works fine with os version 2.0.
-...
I am trying to get the IP Address using NSHost. With the NSHost object I can use the addresses method to access an array of objects one of which is the IP Address. I fear though that the IP Address may change position in the array from one machine to the other. Is there a way to access this information in a universal way?
There was an a...
I'm currently using this code
NSHost *host = [NSHost hostWithAddress:hostname];
if (host == nil) {
host = [NSHost hostWithName:hostname];
if (host == nil) {
[self setMessage:@"Invalid IP address or hostname:"];
return;
}
}
to retrive my IP Address for a networking app I'm working on, however I'm aware t...