title: Reachability's reachabilityWithAddress does not work
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/4070754/iphone-sdk-reachabilitywithaddress-issue">iPhone SDK reachabilityWithAddress issue</a>  </p>
  </blockquote>
  
  
  
  <p>I am trying to determine if the iphone can connect to a particular  IP address (Simple ping) using following code:</p>
  
  <pre><code>struct sockaddr_in server_address;   
  server_address.sin_len = sizeof(server_address);
  server_address.sin_family = AF_INET;
  server_address.sin_port = htons(8888);
  server_address.sin_addr.s_addr = inet_addr("192.168.105.44"); // ip address of a server on LAN
  Reachability *r = [[Reachability reachabilityWithAddress:&amp;server_address ] retain];
  NetworkStatus internetStatus = [r currentReachabilityStatus];
  </code></pre>
  
  <p>But it always says that the status is 'Reachable' regarless of what I give in the IP address. Am I doing anything wrong? Why won't this work? Thanks in advance.</p>