public void run() {

        while (isPlaying) {
            try {
                input = client.receive();
                processInput();
            } catch (IOException ex) {
                ex.printStackTrace();
            }
        }
    }