Question: Implementation of a multi-threaded chat room service... The system contains one chat server ( multi-threaded ) and multiple chat clients The C/C++ chat application you

Implementation of a multi-threaded chat room service... The system contains one chat server (multi-threaded) and multiple chat clients

The C/C++ chat application you are going

to build is a console application that is launched from the command line using TCP connection.

The system will have one (multi-threaded) chat server, and multiple chat clients. Socket interface is used to implement network communications.

There can be multiple clients connect to a server and they can chat to each other. Only two users who are messaging can see each others message and other users cannot see these messages. It is a private chat between two users.

The server recognizes four commands, CONN, MESG, MERR and GONE. CONN establishes a new client, sends a list of current clients, and notifies other clients a new person has joined the group. MESG sends a private message to the person designated. MERR sends last message again without an error if there is an error detected from receiver side. GONE removes an active client account and notifies all other members the client has left and kill the thread.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!