static String getLocalHostName(String byConnecting, int port) {
		InetAddress addr = getLocalInetAddress(byConnecting, port);
		if (addr != null) {
			return addr.getHostName();
		} else {
			return "localhost";
		}
	}
Get local host name by connecting to a server.

@param byConnecting the server address to connect.
@param port         the port to connect
@return localhost name. if fails, return "localhost"
ngrinder-core/src/main/java/net/grinder/util/NetworkUtils.java