الفريق العربي للبرمجةأرشيف المنتديات · 2000 – 2023
نسخة أرشيفية للقراءة فقط — التسجيل والمشاركة مغلقان، والمحتوى محفوظ كما كان.

كتابة برنامج غرفة دردشة بال ++C ممكن مساعدة

بدأه albader9876 في 10 نوفمبر 2010 · 1 رد · 406 مشاهدة · في الأسئلة المجابة
مشاركة: واتساب X فيسبوك تيليجرام
#1 صاحب الموضوع

السلام عليكم اخوني

اتمنى منكم المساعدة في كتابة هذا البرنامج لان الصراحة خبرتي بالسي ما هي قوية اذا فيه احد يعرف يكتب الاكواد ابغى اكون له شاكر ومقدر.

I want to implement a simple chat room that includes a client and a server.

The client program provides commands: login (allow users to join the chat room),

newuser (create a new user account), send (send a message to other clients; actually send

the message to the server and the server forwards the message to other clients), and

logout (quit the chat room).

The server runs a chat room service, manages all the clients and distributes the messages

I'm going to explain

I nedd to implement a server and a client. The server will use 1 plus the last four digits of

number 1010 . For example, if the last four digits of number is 1010, then as the server

port number is 11010.

In this project, only one active client connects to the server. The following commands

need to be implemented at the client side and the server side implements the

corresponding functions required to support these commands. When the server starts, it

should first read the user account information from a file. the initial

user accounts (UserID, Password) are (Tom, Tom11), (David, David22) and (beth,

beth33).

1. login UserID Password

If the server can verify the UserID and the Password, the server will send a

confirmation message to the client; otherwise, the server will decline login and send

an error message to the client.

2. newuser UserID Password

Create a new user account. The length of the UserID should be less than 32, and the

length of the Password should be between 4 and 8 characters. The server will reject

the request if the UserID is already there. The users’ IDs and passwords should be

kept in a file.

3. send message

Send the “message” to the server. The server will precede the message with the

UserID and send it back.

4. logout

Logout from the chat room. Once logout, the connection between the server and

client will be closed. The server should allow the next client to connect.

Sample client output.

My chat room client. Version One.

>send

>Server: Denied. Please login first.

>login Tom tom11

>Server: Tom joins

>send Hello.

>Tom: Hello.

>send Bye.

>Tom: Bye.

> logout

>Server: Tom left.

#2

اولا لا تُفكر ان احدا سوف يقوم بمساعدتك فى كتابة هذا البرنامج ( انت تحلُم) لكن اذا كان هناك جزء بسيط من كود ما فى مثل تلك البرامج سوف نقوم بمساعدتك

اذا.... فأرنا محاولتك كى نقوم بمساعدتك

و الا اغُلق الموضوع

.Everyone has a dream

.I never thought that I would be the one I am on now

...No Pain No Gain

مشرف قسم السى/سى++ و الاسيمبلى سنة 2015 بأذن الله ...

تعديل: مشرف قسم السى/سى++ من 2012.

مواضيع مشابهة

عدد الزوار حالياً

المتواجدون خلال آخر دقيقتين · يتحدّث كل ٣٠ ثانية

—الإجمالي—أعضاء مسجّلون—زوار بدون تسجيل

جارٍ التحقق من المتواجدين…