starting steam and paring work

This commit is contained in:
Diego Waxemberg
2014-10-20 13:35:42 -04:00
parent 44a7494823
commit 4d7715565a
14 changed files with 244 additions and 58 deletions
+7 -3
View File
@@ -26,11 +26,13 @@
- (int) resolveHost
{
struct hostent *hostent;
if (inet_addr([self.hostName UTF8String]) != INADDR_NONE)
{
// Already an IP address
return inet_addr([self.hostName UTF8String]);
int addr = inet_addr([self.hostName UTF8String]);
NSLog(@"host address: %d", addr);
return addr;
}
else
{
@@ -39,7 +41,9 @@
{
char* ipstr = inet_ntoa(*(struct in_addr*)hostent->h_addr_list[0]);
NSLog(@"Resolved %@ -> %s", self.hostName, ipstr);
return inet_addr(ipstr);
int addr = inet_addr(ipstr);
NSLog(@"host address: %d", addr);
return addr;
}
else
{