联系方式

  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-21:00
  • 微信:codinghelp

您当前位置:首页 >> C/C++编程C/C++编程

日期:2018-12-13 10:18

CQUPT – University at Albany

Computer Science – International College

CSI 400 Operating Systems – Fall 2018

Programming Assignment 3 – Client/Server Chat   (Draft Copy)



You are to design and implement a client/server chat application. The application will allow a client to communicate with all the other clients connected to the server.


For this application clients will send data to the chat server and inform the data destination. This means the client will provide both the data and the id of the other client to whom the message is to be sent. This would allow one client to communicate with more than one user through a single connection to the server. One advantage of this approach is that clients need not know the IP of the others.


Definition of the language/protocol

Before implementing the language used by the chat application, we have to know which instructions will be transmitted from a client to another as well as instructions that contain specific meaning to the server.


The dynamics of the application

A client must register to the application through the server, by sending his/her login to the server.  The login information needs to be unique.

A client not identified can't use the chat service until recognized by the server.

The server forwards the list of clients registered to each client current using the service.

A client can send a text message to any client registered.

The server can disconnect any client and can send information to any client.

Encoding/decoding


Data will be encoded according to the following syntax.

<TAG>value</TAG>

where TAG represents a reserved word associated to an instruction and value is the value of the instruction.


Tag used to implement the language are:

REQUEST : request a login or a disconnection.

MSG : text message from a client to another

LOGIN : authentication  of a client to the server.

LOGIN_LIST : contains a  list of client current using the application.

INFO: Information message from the server.

TO: Station where message is to be sent.

FROM: Station that generated the message.

BODY:  Text contents of the message.

A message from a client (c1) to another (c2), may be encoded as:

 <MSG><FROM>c1</FROM><TO>c2</TO><BODY>text</BODY></MSG>

Your server will process the MSG command and will forward the text message to the user referred in the destination portion of the message.


Requirements:

-Use C, C++, C#, etc… Whatever makes sense for this project.

-Optional use of a GUI .


Milestones (One page documentation for each milestone)

1)Create a single client/server application. Due Dec 12th .

2)Modify your single client/server design to support multi-client requests. Due Dec.14th.

3)Implement the chat protocol. Also provide documentation for the complete project.

Due Dec 17th .


Your program should be layered, modularized and well commented. The following is a tentative marking scheme and what is expected to handed in for this assignment:


1.External Documentation including [8-12 pages]

-title page

-a table of contents

-introduction


-[15%] design documentation (2-3 pages)

- a high-level data flow diagram and brief descriptions of major components for each

  Program

- transport service type (connection-oriented or connetionless)

- brief description of components in client and server


     -    [15%] implementation documentation (2-3 pages)

            - client and server process descriptions

            - brief description for each routine

            - internet socket type (stream, datagram )

            - programming language used

            - any UNIX/Linux utilities used.


-[15%] test documentation (3-4 pages)

- descriptions of what kind of testing and how they are performed.

- show compilation and makefile


     -     [5%] user documentation (1-2 pages)

           - where is the source

           - how to run the program (invoke and shutdown the programs on what machines)

           - describe parameters


2.Source Code [50%]

-[40%] correctness

-[10%] programming style

                      - layering, modularity, readability, comments and efficiency


版权所有:编程辅导网 2021 All Rights Reserved 联系方式:QQ:99515681 微信:codinghelp 电子信箱:99515681@qq.com
免责声明:本站部分内容从网络整理而来,只供参考!如有版权问题可联系本站删除。 站长地图

python代写
微信客服:codinghelp