public void startWork ()
	{
		try
		{
			boolean hashFound = false;
			String inputLine;
			Scanner netScanner;
			String serverString;
			String instType;
	
			//Open socket to server
			toServer = new Socket (hostAddr, portNumber);
			
			//Set up output from socket
			socketOutput = new PrintWriter(toServer.getOutputStream(), true);
			
			//Set up input to socket
			socketInput = new BufferedReader(new InputStreamReader(toServer.getInputStream()));
			
			//Gets one line of input from the user's command line
			commandLine = new BufferedReader(new InputStreamReader(System.in));
			
			//Keep getting input lines until ctrl+d
			System.out.print ("[CLIENT] Enter message to send to server and get a chunk of work: "); 
			
			while ((!hashFound) && ((inputLine = commandLine.readLine()) != null))
			{
				//Send the userInput line to the server
				socketOutput.println ("[COMMAND] GiveWork");
				
				//Get response from server
				serverString = socketInput.readLine();
								
				System.out.println ("[SERVER->CLIENT] Message received from server: \"" + serverString + "\"");
				
				netScanner = new Scanner (serverString);
				netScanner.next(); //Skip the [COMMAND] for now
				instType = netScanner.next(); //Read in the command type
				
				if ("Work".equals(instType))
				{
					workMode(netScanner);
					System.out.print ("[CLIENT] Enter message to send to server and get a chunk of work: ");
					//Get another line of input at the top of this loop
				}
				else if ("Found!".equals(instType))
				{
					//read in the answer
					netScanner.next();	//Skip over the "Answer is:"
					netScanner.next();
					
					System.out.print ("[SERVER] Server says answer has been found. ");
					System.out.println ("Plaintext is: \"" + netScanner.next() + "\"");
					
					hashFound = true;	//Exit the Client from here
				}
				else
				{
					System.out.println ("[NETERROR] Received an invalid command via network!");
				}
			}
			
			//Close everything off when we're done with it
			toServer.close();
			socketOutput.close();
			socketInput.close();
			commandLine.close();
			
			System.out.println ("[SYSTEM] Client has finished working. Terminating.");
		}
		catch (UnknownHostException uhe)
		{
			System.out.println ("[ERROR] UnknownHostException for host \"" + hostAddr + "\"");
			System.exit(1);
		}
		catch (IOException ioe)
		{
			System.out.print ("[ERROR] IOException: Could not connect ");
			System.out.println ("to \"" + hostAddr + "\" on port \"" + portNumber + "\".");
			System.exit(1);
		}
	}