@Override
    public void run() {
        ObjectInputStream in = client.getIn();
        
        while(true){
            if(stop)
                break;
            
            Object ob = null;
            
            try{
                if((ob = in.readObject()) != null){
                    Message m = (Message)ob;
                    processMessage(m);
                }
            }catch(Exception e){
                e.printStackTrace();
            }
            
        }
        
    }