public void run () 
	{
        try
		{
			String inputLine;
			socketOutput = new PrintWriter(clientSocket.getOutputStream(), true);                   
			socketInput = new BufferedReader(new InputStreamReader(clientSocket.getInputStream()));
			Scanner netScanner;
			String instType;
			
			System.out.print ("[SERVER] A new client has joined from the following address: ");
			System.out.println (clientSocket.getInetAddress().getHostAddress());
			
			//Handle client input here
			while (!hashFound)
			{
				inputLine = socketInput.readLine();
				System.out.println ("[CLIENT->SERVER] Message received from client: \"" + inputLine + "\".");
				
				//Determine command type here
				netScanner = new Scanner (inputLine);
				netScanner.next();	//Skip the [COMMAND] part
				instType = netScanner.next();	//Read in the instruction type
				
				if ("GiveWork".equals(instType))
				{
					giveWork(netScanner);
					System.out.println ("[SERVER] Waiting for inbound traffic from the client...");
					//Wait for more Client communications at the top of this loop
				}
				else if ("Found!".equals(instType))
				{
					//Scan the answer in
					netScanner.next();	//Skip over the "Answer is" part
					netScanner.next();
		
					//Display the answer
					answer = netScanner.next();
					System.out.print ("[SYSTEM] Answer has been found! ");
					System.out.println ("Hash value was \"" + TARGET + "\" and plaintext was \"" + answer + "\"");					
					
					hashFound = true;	//Exit the ServerThread from here
				}
				else
				{
					System.out.println ("[NETERROR] Received an invalid command via network!");
				}
			}
			
			//Wait for one last connection, tell the client it's time to leave
			if (null == answer)
			{
				System.out.println ("[SYNCERROR] ServerThread is terminating without having found an answer!");
			}
			else
			{
				giveAnswer();
			}
			
			clientSocket.close();
			socketOutput.close();
			socketInput.close();
			
			System.out.print ("[SERVER] A client with the following address has been disconnected: ");
			System.out.println (clientSocket.getInetAddress().getHostAddress());
		} 
		catch (IOException ioe)
		{
			System.out.print ("[ERROR] IO error when maintaining a client's connection at ");
			System.out.println ("address \"" + clientSocket.getInetAddress().getHostAddress() + "\".");
		}
	}