Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

CME 3205 Operating Systems

Assignment#3 - ​DEU Chat


Socket Programming

Due date
26th December 2019 Thursday, 23.59

Goal
In this assignment, you will implement server side and client side socket programming.

Implementation Details & Requirements


People want to talk with others about specific subjects or different areas in the digital rooms
which are named as chat rooms. We will develop chat system to meet this need. In this
system, we must have a chat server and we may have more than a client.

The server must be up always for the system works. It executes commands which are taken
by clients and controls and manages the system. The server will be hosted on ​localhost
and its port is ​3205​. When the client connects successfully to the server, it will enter its
nickname initially. Then it is located in the common area such as lobby.

The commands are described in below can be used in the system:

● -list​: Lists the currently available rooms with the name of the customers in it. If the
room is private, no details should be given.
● -create ​room_name: ​ Creates a new specified room. Not more than one room with
the same name.
● -pcreate ​room_name: ​ Creates a new specified private room. This type of room has
been protected with password. The system will ask to define a password.
● -enter room_name​: ​Enter to the specified room. If the room is private, the client
must know the password for enter.
● -quit ​room_name​: ​Quit from the room that you are in. You come back to the
common area.
● -msg ​message_body​: ​Sends a message to room that you are in. Your and the
others' messages should look different in the room.
● -whoami​: ​Shows your own nickname information.
● -exit​: ​Exit the program.

Client can create room and it cannot be in more than one room at a time, but it can enter and
exit different rooms at any time. Clients in the same room can see all posts.

1
CME 3205 Operating Systems
Assignment#3 - ​DEU Chat
Socket Programming

Submission
Submission will be via Github.
● GitHub Classroom Invitation link:
https://classroom.github.com/a/JBpWmn5S
● Name your code files for server and client such as:
○ StudentNumber_server.c
○ StudentNumber_client.c
(do not use another naming standard.)
● You will lose credit for not naming your submission properly. (15 pts)
● Late submission is not accepted.
● For this assignment you will work individual.
● The POSIX library (pthread) will be used.
● We compile your code with ​gcc​.

Academic Dishonesty
Your submissions will be scanned among each other as well as the Internet repository. Any
assignments that are over the similarity threshold of a system for Detecting Software Similarity will
get zero. We strongly encourage you not to submit your assignment rather than a dishonest
submission.

Grading policy
● Documenting code and coding style (proper indentation, describe critical functions)
(20 pts)
● Implementation of server side programming (50 pts)
● Implementation of client side programming (30 pts)

For Questions
For any questions about the assignment please use Classroom systems comments under Assignment
announcement. Before asking your question, please check carefully previous questions and answers,
where similar questions were already asked by someone else already answered.
● No private questions via email will be answered!!!
● Use classroom public messages to ask question, where someone else may benefit from and
learn something from your question and its answers.
● We will try to answer any of your questions as soon as possible.
Good luck!!!

Read all of the instructions carefully, if you find something UNCLEAR, please ask help to CLARIFY it!

You might also like