private static void menuLoop(StatClient client) throws IOException {
		while (true) {
			// Print the menu
			System.out.print(prompt());
			
			// Get the input
			String userInput = System.console().readLine();
			if (!userInput.matches("[1-7]")) {
				System.err.println("Incorrect input! Enter a number between 1-7");
				continue;
			}
			
			// Connect to the client
			client.connect();
			
			// Determine the message to send
			Integer entry = Integer.parseInt(userInput);
			String message = "";
			switch(entry) {
				case 1:
					message = "date";
					break;
				case 2:
					message = "uptime";
					break;
				case 3:
					message = "memory";
					break;
				case 4:
					message = "netstat";
					break;
				case 5:
					message = "users";
					break;
				case 6:
					message = "procs";
					break;
				case 7:
					System.out.println("Goodbye!");
					client.disconnect();
					System.exit(0);
					break;
				default: // This should never happen!
					break;
			}
			
			// Send the message to the server
			String serverResponse = client.sendMessage(message);
			
			// Print the results
			System.out.println("Sent message: " + message);
			System.out.println("Got response: " + serverResponse);
			
			// Disconnect from the server
			client.disconnect();
		}
	}