public synchronized void setDesonnected(boolean cr) {
        if(socket!=null && cr==true) {
            try	{
                socket.close();
            } catch (Exception e) {
                System.err.println("Error closing client : setDesonnected : "+e);
            }
        }
        desonnected=cr;
        //parent.setClientSocket(null);
    }