Re-do the solution from project 4 with the following adjustment.
All token processing will now be handled on the server. This requires the tokenizer to be moved there. You'll need another queue on the server to handle inputStructs, and the communication thread that gets incoming messages from the socket will need to read inputStruct's instead of tokenStructs. After the token counter thread processes a token, the token must now be returned to the client(see beow). The token classifier should no longer display the token and its type on the server. However, the token counter should still display the counts by token category.
Use another thread to write the processed tokens back to the client. The token counter will place the tokens on yet-another-queue. The write-back thread will retrieve each token from this queue and send it back to the client. Use the same connection number(acquired from accept()'s return value) from writing to the socket. Write the "all done" token back to the client when finished.
The client will now handle the input and send the inputStruct's to the server via the communication thread, using a queue from inter-thread communication. A new thread is needed to handle the return messages from the server - as above, these will be individuall tokenStruct's process by the server. The client exits when it receives the "all done" token from the server.