

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
An assignment for a tcp chat server in cs332 course. Students are required to write the server code based on the given outline, handle command-line arguments, and implement error handling. The server should recognize special messages from clients and respond accordingly. The document also includes implementation notes and grading rubric.
What you will learn
Typology: Slides
1 / 3
This page cannot be seen from the preview
Don't miss anything!
For this assignment, you need to write the chat server for which you wrote a client last week. The basic outline of the server code is this:
When verbose is turned on, your client should print out enough information to help you figure out what your program is doing. E.g., my client prints out a message whenever it gets a new connection from a client, whenever that client connection goes away, whenever it resends a message to all clients, etc.
Implementation Notes Your code should handle errors gracefully. I.e., if a system call returns an error, you should print out a useful message and exit gracefully. The user should not see a core dump or a stack trace printed out. You must handle the case where the server goes down when your client is still connected. You will find the first lines of the talk_server.py file in /home/cs/332/sp2016/chat/ folder. You exit your talk_server by doing Ctrl-C in the terminal window in which it is running. There are a ton of implementations of this online. For your own learning experience, do not copy and paste code from them. If you have to look up how to use select(), e.g., you’ll probably see an implementation of the client or server… Try to implement as much as you can without copying code from online. You must cite every place where you find code that you copy into your code. Those Doing the Class for Honors The server must recognize and respond to the following special message that clients can send: