Chat (part 14)

  • 28
  • Locked
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.
You can't complete this task, because you're not signed in.
Comments (1)
  • Popular
  • New
  • Old
You must be signed in to leave a comment
Justin Smith
Level 38 , Greenfield, USA, United States
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.