Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Multi - threaded and Multi - user Chat Application with using C language. In this project, you are expected to develop a messaging server and

Multi-threaded and Multi-user Chat Application with using C language.
In this project, you are expected to develop a messaging server and client using socket programming. In this system, there will be multiple clients and a single server. Clients will communicate with the server using the LIST, LOGIN, LOGOUT, MSG, INFO, and REGISTER commands.
Requirements
The messaging server and client you develop must support at least the following commands:
1. LIST
o Used to list the users on the server and their online/offline status.
o Usage: LIST [mask]
o mask indicates the listing mask created with * or ?
2. LOGIN
o Allows a user to log into the system.
o Usage: LOGIN [mood]
username: The user's name.
password: The user's password.
mood (optional): The user's current mood.
3. LOGOUT
o Allows the active user to log out of the system.
o Updates the user's status on the server and terminates the thread associated with this user.
4. MSG
o Sends a message to a specific user or all online users.
o Usage: MSG
username: The name of the user to whom the message will be sent. If * is used, the message is sent to all online users.
message: The text of the message to be sent.
5. INFO
o Shows the first name, last name, and mood of the specified user.
o Usage: INFO
username: The name of the user whose information is requested.
6. REGISTER
o Allows a new user to register in the system.
o Usage: REGISTER
username: The name of the new user.
firstname: The first name of the new user.
lastname: The last name of the new user.
password: The password of the new user.
Persistence
The messaging server and client application to be developed should be designed to work continuously and be reusable. Users should be able to continue messaging and communicating as long as the system is not shut down.
Client Application
The client application will show from whom the message was received when a message is received.
Commands can be taken one by one or in bulk; you are free in this regard.
Multi-threading
A separate thread will be created for each user who logs into the system, and the application will work in a multi-threaded manner.
Storing User Information
User information will be stored in a text file. This file will contain usernames, first names, last names, passwords, and mood information.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Microsoft Visual Basic 2017 For Windows Web And Database Applications

Authors: Corinne Hoisington

1st Edition

1337102113, 978-1337102117

More Books

Students also viewed these Databases questions

Question

2. Always guess when you can eliminate some of the alternatives.

Answered: 1 week ago