Client: put read-and-process-message inside a loop.