Let's start writing the main functionality of the Client class. 1) Add a public void run() method. It should create a helper SocketThread, wait until it establishes a connection with the server, and then in a loop, read messages from the console and send them to the server.
Chat (part 14)
You must be signed in to leave a comment
19 March 2022, 13:12
I believe there is an error in the directions. Part d says: "Read messages from the console until the client is connected." I think "until" is supposed to be "while". It would not make sense to read messages while the client is disconnected and then stop reading messages when the client becomes connected, which is what using "until" here implies.