Phase 2: Networking

[For Parts I & II] Overall Program Structure 20
GUI code still works! 5
Correct “main” handling 5
Ability to configure parameters: when the system starts, it should pop up a dialog box to let the user enter in the user name, IP address, and port number. The IP address and port number textfields should be “pre-filled” with the default values of and 6666, but the user should be able to change these before clicking OK. (You can prefill the username with the current, actual username if you wish.) 5
Good modularity, with networking code in which loads correctly 5
[For Part I] Basic Protocol Functionality 30
Correct HELLO handling
  • Sends well-formatted HELLO message at startup time
Correct ONLINE_USERS handling
  • Should receive and process ONLINE_USERS messages from server
  • Should update online users list in GUI appropriately
  • The current user should not be displayed in the list of online users
Correct GOODBYE handling
  • Send GOODBYE message at the time the client shuts down
[For Part II] Conversation Management 50
Should be able to support multiple chats at one time
  • In other words, everything below should work when there are two or more chats going
Correct INVITE and CHAT_ID handling
  • Send INVITE message when new conversation is attempted
  • Receive CHAT_ID message from server and associate the received chat ID number with the chat object in your program
  • Optionally: show a “pending” window, or use other mechanism to indicate no one else is in the conversation
  • Display invitation window upon receipt of an INVITATION from another different user
  • Generate an ACCEPT or REJECT message to the server, depending on the user’s action in the invitation window
Correct JOINED and DECLINED handling
  • Receive JOINED and DECLINED messages from the server indicating that a user has accepted or rejected your invitation
  • Notify the user of this new status
Correct LEAVE handling
  • Generate LEAVE message to server when user exits a chat
Correct LEFT handling
  • Receive LEFT messages from the server when someone leaves a chat you’re in
  • Correctly update the state of the chat, and display the updated chat membership
Correct SEND_MESSAGE handling
  • Sending text should cause a SEND_MESSAGE to be sent to the server
  • Sent text should appear (once) in the transcript
Correct MESSAGE handling
  • Correctly handle received MESSAGEs from the server
  • Any received text should appear (once) in the transcript, tagged by whom it is from
[For Part II] Bonus 20
Server enhancements (sending icons, for instance) 10
Exploit CHANGE_STATUS messages to let users change online status, display this in the GUI, propagate to other users 5
Exception handling above and beyond the call of duty (survive server crashes, malformatted messages from server, etc.) 5