Java程序辅导

C C++ Java Python Processing编程在线培训 程序编写 软件开发 视频讲解

客服在线QQ:2653320439 微信:ittutor Email:itutor@qq.com
wx: cjtutor
QQ: 2653320439
TELE 3118 - Mini-project

TELE 3118: Network Technologies: Project [10 points]

Logistics notes:

This project introduces you to network programming using the socketAPI. The socket API allows applications to communicate across networks, so is useful for general development of network applications, and you will also use it in UNSW courses TELE3119 Trusted Networks, TELE4642 Network Performance and TELE4123 Design Proficiency.The application you will develop is a simple version of a chatprogram that allows two users to chat to each other. Moresophisticated chat programs like Yahoo messenger and MSN chat allowmany more users, multi-party communication, etc, which can be seen asrefinements to this project.

Your application will consist of three parts:

Part 1 [4 points]:Chat registrationclient: This part requires you to write a program that sends a UDPregistration message to the registrationserver.

The isprovided to you, and you can run it on your local machine (on port31180) to test if your client is able to communicate with it. During weeks6-8, the registration server will be running on the machine 149.171.36.211 on UDP port 31180. If you believe the chat registration server is not working on that machine, then please tell the lab demonstrators.

Your registration message to the server must have the following format:

Your registration message should be sent periodically (onceper minute) to the registration server, otherwise the server willconsider you (the user) as having logged off or crashed. In responseto your registration message with the correct password, the server will send you back a messagewith a list of all logged-in users, in the format below:Sample hex UDP payload for a reply from the chat server:
Bytes (hex)Meaning
00 00 00 022 users
64 65 6d 6f 33 31 31 38 00 00 00 00 00 001st username = "demo3118"
02 9a1st user's port = 666
95 ab 25 861st user's IP address = 149.171.37.134
6f 6b 00 00 00 00 00 00 00 00 00 00 00 002nd username = "ok"
26 942nd user's port = 9876
3a 6f 8a 562nd user's IP address = 58.111.138.86

Part 2 [3 points]:Chat messagingserver/client: Once your code from part 1 registers with theserver and obtains the IP address and port number of other logged-inusers, this part will now require you to exchange chat messages withother users. These chat messages will be limited to 100 characters,and communicated using UDP. You therefore need to implement a UDPserver (operating on the port number that you advertised above in yourregistration message) that receives messages from other users, as wellas a UDP client that sends messages to other users. These can beimplemented as a single thread or as separate threads. All messages exchangedmust begin with the 14-byte name of the user sending the chatmessage. Your client code will need to implement the user interfacethat reads messages typed (on the keyboard) by the user, and sendsthem directly to the intended recipient. Likewise, your server codewill have a user interface that displays to the user messages receivedfrom other users. Points will be awarded based on the extent to which you achieved the required functionality, and how well the codeand interface are structured.

Part 3 [3 points]:File transferserver/client: You will now enhance your chat program to allowtransfer of files between between yourself and user "hassan" using TCP. You will send a chatmessage to "hassan" stating that you want to upload a specificfile. "hassan" will send you a chat message back telling you the portnumber (currently hard-coded to 15000) on which his TCP server is ready for upload. You willimplement a TCP client that connects to the server, uploads the file,and then disconnects. You will use this mechanism to upload yourproject source code to the assessor Hassan. Points will be awarded based onthe extent to which you achieved the required functionality, and how well the code and interface are structured.

The is also providedto you for part 3 of your project. You can run a local copy (specifyingthe port number as a command-line argument) and test that your TCPclient is able to transfer the file successfully. Once your client workswith the local server, then you can test your client with Hassan's serverwith IP address specified under user-name "hassan" and port number 15000.

Evaluation

When:Theworking code is to be demonstrated in the lab (343) during sessions that are during Thur/Fri lab time, in week 10-12 according to the schedule on the main TELE3118 web page. Marking will be done in week13. You must demonstrate your code in the session that is allocated for your lab group, and must be ready to demonstrate your code at the beginning of that session.

What:When demonstrating your program(s) you should demonstrate that they achieve the required functionality, and use Wireshark to demonstrate that they achieve that functionality through network communication. The demonstration must occur in the lab, but need not use lab computers - you can provide laptops etc.

Warning:You should test your program(s) in the lab before the demonstration day to ensure that local issues (firewalls, availability of development environments, etc) will not impede your demonstration.

Implementation notes:

本站部分内容来自互联网,仅供学习和参考