public static String getIpClient() throws UnknownHostException, SocketException {

        String interfaceRede = "wlan0";
        String meuIp = null;
        Enumeration<NetworkInterface> interfaces = NetworkInterface.getNetworkInterfaces();
        while (interfaces.hasMoreElements()) {
            NetworkInterface face = interfaces.nextElement();
            if (face.isLoopback() || !face.isUp()) {
                continue;
            }
            Enumeration<InetAddress> endereco = face.getInetAddresses();
            while (endereco.hasMoreElements()) {
                InetAddress addr = endereco.nextElement();
                if (face.getDisplayName().equals(interfaceRede) && addr.getHostAddress().indexOf(".") > -1) {
                    meuIp = addr.getHostAddress();

                }

            }
        }
        clientIp = meuIp;
        return meuIp;

    }