Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Do not copy and send the answer via chegg or from a different place. The answers are wrong or incomplete. But I need a complete

Do not copy and send the answer via chegg or from a different place. The answers are wrong or incomplete. But I need a complete answer. I have 2 days left.If you send an incorrect, incomplete or copied incorrect answer, I will report it to the site and report it.Because I'm tired of asking the same question and getting the same wrong or incomplete answers.And be sure to read the explanation I wrote at the end and answer accordingly.If you are not going to send the code and report as I requested, do not reply.If you do, I will report it to the site. 

Online Chat System with Network Programming: In this project, in C programming language, You will develop a simple online chat system using sockets. The system will consist of 2 modules: - Server module - Client module
Users can exchange plain text chat messages to each other using the client module. they should be able to send. The server module will mediate the transmission and storage of messages. The server allows multiple users to connect and send messages to each other at the same time should support
If the receiver is online at the time of sending the message (connected to the server via socket and logged in), the server should forward the message to the recipient immediately, without waiting. If client, server It should immediately show the messages that come spontaneously by the company on the screen. In front of outgoing and incoming messages, as additional information, to whom it is sent for outgoing messages, incoming For messages, the time of receiving the message and the information from whom it came from should be included. For example a The screen flow after the user starts the client, connects to the server and logs in is as follows it could be:
Signed In You have no pending messages Sent to ali: hello ali, how are you? 21:55:04-ali: thank you.
If the recipient is offline, the server should store the message for later transmission. Permanent storage it need not be; so you don't need to store the messages in a permanent place like disk or database none. There is no harm in deleting messages when the server application is closed and opened. Therefore You can store pending messages in a suitable data structure in memory. Initially the server must be up and running. Clients connect and log in at different times, they can disconnect. Clients will always send messages and clients will will launch it, while the server will respond appropriately to the client. The client, not the server responses, should display messages from other users on the screen.
The protocol of the chat system will consist of the following messages.
- BEGIN_SESSION  The client uses this message to log in. Server: Send all pending messages (if any) in the user's mailbox to the client sends it. If there are no pending messages, it will reply "You do not have any pending messages". - SEND_MESSAGE   The client uses this command to send a message. Presenter: "Your message has been received" - END_SESSION The client uses this message to log out. After this message, the client socket closes the connection. The server does not need to provide a response. -  When the client sends a message other than the above, the server says "Message not understood" answers.
One point you should pay attention to while developing this application is the user's login in the terminal, with the screen where it will perform operations such as sending messages and logging out, message texts that can be sent spontaneously by should not interfere with each other. Otherwise, no one will use your app. won't want to. User logins and messages coming from the opposite server to the user are on the same terminal. As you can go for a solution like printing to different parts of the screen (UNIX/Linux/MacOS systems may require using one of the curses or ncurses libraries), they You can also choose an option such as forwarding to two different terminals, that is, the user While making their entries from one terminal, they can also follow the messages coming from the server from another terminal. should be able to. This second terminal is also created by your program as soon as the client application is started. should be opened, and spontaneous messages from the server to the client, together with the relevant additional information (time, sender information, message text, etc.) should be forwarded to this second terminal. Unix/Linux/MacOS based For systems, after learning the tty (teletypewriter) information of the second terminal (via shell You can get this information with the help of tty and #ps -u commands, exec from within your program. family has discussed how shell commands can be run via system calls. we have seen), with the name of this tty in your program (for ubuntu/Linux based systems, for example; /dev/pts/tty0, or /dev/pts/tty1, etc; may be different on other Operating Systems) Open a file (FILE) in mode and print to this file (fprintf, or write) the results of your actions will be redirected directly to that terminal. Thus, the user's input and messages from other users will not interfere with each other.
This is a requested report from the project.
I. A design narrative : After a short introduction, your design and about your application (data structures used, C functions, requirements explain how each is implemented, etc.). Design and State the reasons for your application choices. Everything in your report There should be enough detail to explain. Minimum number of pages no restrictions, how many pages to explain and explain something It's up to you to decide what you need. ii. A simple user guide (20%) with examples and screenshots. iii. The entire source, supplemented by comment lines between the lines your code.
Can you create this report and post it as a solution?
Please don't just give the codes as an answer.
Because I can't make the report with the given codes.
I would be very happy if someone could do the 3 steps in the report with the codes and send it.
as an answer only the codes don't work for me.
I hope someone can help the way I want.

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_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

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

Get Started

Students also viewed these Databases questions