HRM Essay Marketing Essay Accounting Assignment Media Management Finance Essay Law Essay & Assignment Economics EssayComputer Science Engineering Essay Leadership Essay Knowledge Managment Management Essay
返回首页

Network programming assignment

Overview
In this assignment, you will be required to implement client and server programs for a shared white board application. The application requires two components to be implemented, the client and the server. The client allows a user to manually input drawing commands, which is send to the server. The server then takes these messages and sends them to all of the other clients connected to it. The end result is that all clients can see the drawings being entered by the other users, and the server provides the ability to connect them all together.
Program Requirements
You are required to implement a client in Java as a console based application, which is capable of taking inputs from the user and sending them across the network. Messages from the network must be displayed as text on the standard output device. The server must also be implemented in Java, as a simple console based application. You are free to implement your Java code for the client and server in any way that you like, as long as it meets the following guidelines:
 It must run on Cis-lab using only standard JDK classes and no other external classes
 The server should not have any user interface but may print out text debugging
 You must use the network protocol and ports that we have specified in this document
 You must use the supplied command lines to start up your client and server
This assignment is broken up into two parts, the client and the server. We will provide a server that implements the protocol specified in this document which you can use to test your client against while you are developing it. The provided server will also be useful to allow you to test your assignment with other students who are testing at the same time. When your client is working, you can then use it to test out the server that you have implemented yourself.
Network Protocol
The protocol that is used in this assignment is based on a simple text format to make it easy to implement and debug and problems. Messages are sent over a TCP connection to guarantee reliability and delivery, and also to provide a simple transmission mechanism similar to writing to a file. Each message is sent as a command followed by the required arguments, using a single space character as a separator and a new line character to end the command. Note that the client can exit by simply closing the connection to the server, and the server must handle this cleanly. There are a set of protocol messages that you will be required to implement.
Client to server messages
LOGIN [username]
The client sends this message to the server when it initially connects. The server will not process any other messages nor allow the client to see any drawing messages until this message has been processed. The username must contain only the letters A-Z, a-z, or the digits 0-9, any other characters such as punctuation or spaces are not allowed. The server must check to ensure that usernames are unique, so that no two clients may connect with the same user name.



------分隔线----------------------------
UK Thesis Base Contacts

24小时在线客服

QQ:77276002

Email:77276002@qq.com

推荐内容