-
Notifications
You must be signed in to change notification settings - Fork 0
Client Information
Dustin Schnelle edited this page May 26, 2018
·
2 revisions
- Check sure host argument was input by user
- Create a socket object
- Create a client socket object
- Upon successful client setup continuously loop
- Add the client to the connection list
- Wait for the server to communicate (2 possible scenarios)
Scenario #1: The current client is not the one sending the message to the server
Scenario #2: The current client is the one send the message to the server
7a. The current client is not sending the message
- Receive the message from the server (2 possible scenarios)
Scenario #1.1: The received message in not valid
Scenario #1.2: The received message is valid
9a. Invalid message from the server
- Gracefully exit the program (Server disconnected)
9b. Valid message from the server (3 possible scenarios)
Scenario #1.2.1: Quit message received from the server
Scenario #1.2.2: Clients first communication and is unknown to the server
Scenario #1.2.3: Client is know to the server
10a. Gracefully exit the program (Client leaving)
10b. Write to the client's output terminal
- Prompt the client for their name
10c. Write to the client's output terminal
- Prompt the client
7b. The current client is sending the message
- Send the message to the server