public static void listenToServer() throws IOException {
        // Get in and out streams to the server
        BufferedReader in = new BufferedReader(new InputStreamReader(
                serverConn.getInputStream()));

        try {
            /*
             * Handle each update from the server.
             * 
             * Why this design is free of concurrency issues:
             * 
             * This design is free of concurrency issues because it is the only
             * thread that modifies the view. So there is no other thread that
             * will be changing data while this one is attempting to do
             * something. And there will also be no race conditions.
             */
            for (String update = in.readLine(); update != null; update = in
                    .readLine()) {
                // Quit when we are done
                if (!handleUpdate(update)) {
                    break;
                }
            }
        } finally {
            // Close our stuff
            in.close();
            serverConn.close();
        }
    }