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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started