Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

LAKLAK: Multi - threaded and Multi - user Chat Application In this project, you are expected to develop a messaging server and client using socket

LAKLAK: Multi-threaded and Multi-user Chat Application
In this project, you are expected to develop a messaging server and client using socket programming. In this system, there will be many 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:
LIST
Used to list users on the server and their online/offline status.
Usage: LIST [mask]
The mask shows the listing mask created with * or ?.
LOGIN
Allows a user to log into the system.
Usage: LOGIN [mood]
username: The name of the user.
password: The password of the user.
mood (optional): The current mood of the user.
LOGOUT
Allows the active user to log out of the system.
Updates the user's status on the server and terminates the thread associated with this user.
MSG
Sends a message to a specific user or all online users.
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.
INFO
Shows the name, surname, and mood of the specified user.
Usage: INFO
username: The name of the user whose information is requested.
REGISTER
Allows a new user to register to the system.
Usage: REGISTER
username: The name of the new user.
name: The first name of the new user.
surname: The last name of the new user.
password: The password of the new user.
Persistence
The developed messaging server and client application should be designed to be continuously operational and 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 who the message is from when a message is received.
Commands can take parameters one by one or all at once; you are free in this regard.
Multithreading
A separate thread will be created for each user logged 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.
We will implement this project between two computers on Debian Linux. One computer will be the client, and the other will be the server. Can you provide the necessary code in C and explain what we need to do?

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

Visual Basic Net Database Programming

Authors: Rod Stephens

1st Edition

0789726815, 978-0789726810

More Books

Students also viewed these Databases questions

Question

Evaluate employees readiness for training. page 275

Answered: 1 week ago