/**
* Determines own remote IP address (e.g. can be used to probe if we are
- * reachable from outside by determining external IP and then connect to it.
+ * reachable from outside by determining external address and then connect to it.
* This is accomblished by connecting to the IP of www.shipsimu.org which
* should default to 188.138.90.169 and requesting /ip.php which does only
* return the content of $_SERVER['REMOTE_ADDR']. Of course, this method
* Compare to following link:
* http://de.php.net/manual/en/function.socket-create.php#49368
*
- * @return $externalAddress The determined external IP address
+ * @return $externalAddress The determined external address address
* @todo Make IP, host name, port and script name configurable
*/
public static function determineExternalAddress () {
// Debug message
/* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('CONSOLE-TOOLS[' . __METHOD__ . ':' . __LINE__ . ']: Resolved external address: ' . $externalAddress);
- // Return determined external IP
+ // Return determined external address
return $externalAddress;
}
}
/**
- * Sends a raw HTTP request out to given host/port
+ * Sends a raw HTTP request out to given IP/host and port number
*
* @param $method Request method (GET, POST, HEAD, CONNECT, ...)
* @param $host Host to connect to
/**
* Determines own remote IP address (e.g. can be used to probe if we are
- * reachable from outside by determining external IP and then connect to it.
+ * reachable from outside by determining external address and then connect to it.
* This is accomblished by connecting to the IP of www.shipsimu.org which
* should default to 188.138.90.169 and requesting /ip.php which does only
* return the content of $_SERVER['REMOTE_ADDR']. Of course, this method
* Compare to following link:
* http://de.php.net/manual/en/function.socket-create.php#49368
*
- * @return $externalAddress The determined external IP address
+ * @return $externalAddress The determined external address address
* @throws InvalidSocketException If socket initialization wents wrong or if an errors occurs
* @todo This should be moved out to an external class, e.g. HttpClient
* @todo Make IP, host name, port and script name configurable
// Debug message
/* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('CONSOLE-TOOLS[' . __METHOD__ . ':' . __LINE__ . ']: Resolved external address: ' . $externalAddress);
- // Return determined external IP
+ // Return determined external address
return $externalAddress;
}