static String getLocalHostAddress(String byConnecting, int port) {
		InetAddress addr = getLocalInetAddress(byConnecting, port);
		if (addr != null) {
			return addr.getHostAddress();
		} else {
			// It's final...
			return "127.0.0.1";
		}
	}
Get local address by connecting to a server.

@param byConnecting the server address to connect.
@param port         the port to connect
@return IP address local IP address
ngrinder-core/src/main/java/net/grinder/util/NetworkUtils.java