public String getIP() {
        String ipAddress = "";
        try {
            //        return socket.getInetAddress().toString();
            InetAddress IP = InetAddress.getLocalHost();
            ipAddress  = IP.getHostAddress();
        } catch (UnknownHostException ex) {
            Logger.getLogger(Client.class.getName()).log(Level.SEVERE, null, ex);
        }
        return ipAddress;
    }