Interaction: Client connects to server start: Client sends log in message If they send something else, they should receive an error If there is a name conflict: The server will send an error, and we return to the start If not: The server will send an accept message The server will send a list of logged-in users While the client is logged in: If the client sends a broadcast message: The server relays it to all users If the client sends a specific message: The server relays it to the specific user If there is no such user, it returns an error If the user is logged in, it returns a success message If the client sends a log in message: Same as the start If a new client logs in: Server will send a new user message When the client disconnects: The server sends a message that they disconnected Messages in this protocol: Login Error New User Accept Login Accept Specific Message Broadcast Message Specific Message User Disconnected New Broadcast Message Login: (1) Type: 1 (32) Username: ASCII string Error: (1) Type: 2 (2) Error Message Length: 16-bit unsigned integer (?) Actual error message: ASCII string New User: (1) Type: 3 (32) Username: ASCII string Accept Login: (1) Type: 4 Accept Specific Message: (1) Type: 5 Broadcast Message: (1) Type: 6 (2) Message Length: unsigned 16-bit integer (?) Actual Message: ASCII string Specific Message: (1) Type: 7 (32) Username: ASCII string (2) Message Length: unsigned 16-bit integer (?) Message User Disconnected: (1) Type: 8 (32) Username: ASCII string New Broadcast Message: (1) Type: 9 (32) Message Sender: ASCII string (2) Message Length: unsigned 16-bit integer (?) Actual Message: ASCII string