1. Homepage
  2. Programming
  3. IERG3310 Computer Networks Project: STUDENT ROBOT

IERG3310 Computer Networks Project: STUDENT ROBOT

Engage in a Conversation
CUHKIERG3310Computer NetworksSTUDENT ROBOTTCPUDPC++JavaPython

Project Requirements CourseNana.COM

In this project, students learn hands-on experience on both TCP and UDP socket programming. Students are required to write a program (STUDENT) to interact with the provided program (ROBOT). You are allowed to use the ROBOT source codes given (written in C/C++, java and Python) in the project package to complete this project. All students should finish steps 1 to 8. Steps 1 to 6 give you a taste of basic programming. Steps 7 to 8 ask you to do some simple experiments using the programs. You must do this project by yourself. However, you are allowed to discuss with your friends or fellow students, but DO NOT copy others’ code. We perform code-similarity-checking on your submitted code. CourseNana.COM

Basic Programming Part: CourseNana.COM

Your program, STUDENT, has to interact with ROBOT according to the following steps: CourseNana.COM

  1. Start the ROBOT by running “robot.exe” in a command prompt. CourseNana.COM

  2. When the ROBOT is started, a message ROBOT IS STARTEDwill be printed, indicating that the ROBOT is now listening on TCP Port 3310. STUDENT has to connect to the ROBOT TCP Port 3310 and send your 10 char student ID string via the connection established. CourseNana.COM

  3. The ROBOT will then send a 5 char string ddddd to STUDENT. STUDENT will need to create a TCP socket s_2 at port ddddd to accept a new connection. The ROBOT will initiate a new connection to port ddddd of TCPSTUDENT one second after sending ddddd to STUDENT. CourseNana.COM

    Upon accepting the connection, a new socket s2 will be returned. CourseNana.COM

  4. ROBOT will then send a 12 char string fffff,eeeee.to the STUDENT using the new connection. STUDENT needs to decode the message and create a UDP socket s3 to CourseNana.COM

send a randomly generated integer variable num (5 < num < 10) to ROBOT on port fffff. Then ROBOT will send a char string xxx... of length num * 10 to STUDENT one second after receiving num and STUDENT will receive the string using s3 on UDP port eeeee. CourseNana.COM

SOCKET s2 CourseNana.COM

SOCKET s3 on port: eeeee CourseNana.COM

Sendto variable num CourseNana.COM

Recv num* 10 char string xxx. CourseNana.COM

UDP port: fffff CourseNana.COM

STUDENT
Recv 12 char string fffff,eeeee. CourseNana.COM

ROBOT will send the string xxx... 5 times, once every 1 second. STUDENT only needs to receive any one of the strings. CourseNana.COM

5. When STUDENT receives the char string xxx, it will send back the string to the ROBOT at UDP port fffff. The string will be sent 5 times, once every 1 second. The ROBOT will check if the two strings are the same. CourseNana.COM

STUDENT
Sendto num*10 char string 5 times CourseNana.COM

SOCKET s3 CourseNana.COM

num*10 char string CourseNana.COM

6. In this step, you need to run ROBOT and STUDENT on 2 different machines and make sure all the steps above can be successfully executed. You may need to use Wireshark on the machines for network-level debugging, e.g., if there is a firewall on either of the machine and/or along their end-to-end path, the programs may fail. It is then your responsibility to fix it, e.g., by choosing a different pair of machines elsewhere and/or configure them properly. CourseNana.COM

(For steps 1 to 6, the original provided ROBOT will be used to test your STUDENT program.) CourseNana.COM

Experiment Part: CourseNana.COM

7. In this step, you will study the effect of the receiver buffer size on the TCP socket s2 on port ddddd by modifying the ROBOT and STUDENT codes. CourseNana.COM

After receiving num, wait for 1 second to send char string xxx... CourseNana.COM

UDP port: fffff CourseNana.COM

First, you will get the existing receiver buffer size of s2 on STUDENT and print it out. Then you must inform ROBOT of this receiver buffer size on TCP Port 3310 by modifying both the STUDENT as well as ROBOT code: STUDENT will need to include some keywords in the string to signal ROBOT that the value is the buffer-size information (e.g. the string can be “bsxxx”, where xxx is the size of your buffer). Modify the source code of ROBOT, so that when it receives the buffer-size information from the STUDENT, it will send a large number of messages to STUDENTs s2 port as quickly as possible within 30 seconds. STUDENT should be modified so that it can count the size and number of messages actually received in this period and print out the total number of packets STUDENT receives, together with total received bytes. In addition, you could either printout the statistics every ten seconds or after receiving all messages. An example printout can be: CourseNana.COM

[STUDENT] Number of received messages: xxx, total received bytes: xxx. CourseNana.COM

Remark: CourseNana.COM

  1. 1)  The receiver buffer size here is the internal buffer size (receive socket buffer CourseNana.COM

    size). CourseNana.COM

  2. 2)  The messages above refer to messages at the application layer. The message CourseNana.COM

    size can be any value. For example, you can set to have the same size as the receive socket buffer. But this is not absolutely necessary. The assumed message size by the sender and the receiver should be the same to be consistent. You can make your own assumption on the pre-agreed message size between ROBOT and STUDENT. CourseNana.COM

  3. 3)  Note that TCP socket is stream-based. Assuming you use a blocking socket (the default mode), each send() may not completely deliver the intended amount of data from the application-layer buffer to the send socket buffer in each send(). You need to check. An example copied from robot.cc is shown below. Note that byte_left below refers to the message size at the application layer. The while() loop ensures a whole message is delivered to the send socket buffer. If your application wants to send multiple messages, there should be another outer while() loops. When the while() loop below exits without error, that means one application-layer message has been delivered to the send() socket buffer successfully. CourseNana.COM

Students can use C/C++, Java or Python to complete the project. Students can choose to implement the project on any platform that is available in the IE Computing Lab. The platforms available in the IE Computing Lab are Microsoft Windows and Linux. The submitted source codes have to be compliable and runnable in the IE Computing Lab.
CourseNana.COM

Grading and Demonstration CourseNana.COM

Steps 1 to 6 in this project contribute 10% points to the course. Steps 7 and 8 in this project contributes 5% points to the course. The table below contains a comparison: CourseNana.COM

Finished steps 1 to 6 Finished steps 7 to 8 Total CourseNana.COM

achieves
10% of the course 5% of the course 15% of the course
CourseNana.COM

A demo session will be held after the deadline, each student should compile, run and operate his/her program in front of a tutor. The tutor may ask some questions relating to the program, whether or not correctly answering the questions will affect your grading in the project. CourseNana.COM

CourseNana.COM

Submission and Academic Honesty Policy CourseNana.COM

Students are required to submit a zip/rar file containing the executable file, source codes and report describing the design and use of your program to Blackboard https://elearn.cuhk.edu.hk/ before the deadline. Late submission within 24 hours suffers penalty of 30% deduction. Further late submission will be given zero point. CourseNana.COM

Students have to submit the report together with the declaration form to Blackboard for this project. Project without declaration will receive zero mark. You will need to put down the references you used in both the program source code and the report. CourseNana.COM

Software will be used to check if any submitted program is copying from the others. When scholastic dishonesty is suspected, the matter will be turned over to the University authority for inquiry, with a recommendation of "Fail" for the course. CourseNana.COM

Get in Touch with Our Experts

WeChat WeChat
Whatsapp WhatsApp
CUHK代写,IERG3310代写,Computer Networks代写,STUDENT ROBOT代写,TCP代写,UDP代写,C++代写,Java代写,Python代写,CUHK代编,IERG3310代编,Computer Networks代编,STUDENT ROBOT代编,TCP代编,UDP代编,C++代编,Java代编,Python代编,CUHK代考,IERG3310代考,Computer Networks代考,STUDENT ROBOT代考,TCP代考,UDP代考,C++代考,Java代考,Python代考,CUHKhelp,IERG3310help,Computer Networkshelp,STUDENT ROBOThelp,TCPhelp,UDPhelp,C++help,Javahelp,Pythonhelp,CUHK作业代写,IERG3310作业代写,Computer Networks作业代写,STUDENT ROBOT作业代写,TCP作业代写,UDP作业代写,C++作业代写,Java作业代写,Python作业代写,CUHK编程代写,IERG3310编程代写,Computer Networks编程代写,STUDENT ROBOT编程代写,TCP编程代写,UDP编程代写,C++编程代写,Java编程代写,Python编程代写,CUHKprogramming help,IERG3310programming help,Computer Networksprogramming help,STUDENT ROBOTprogramming help,TCPprogramming help,UDPprogramming help,C++programming help,Javaprogramming help,Pythonprogramming help,CUHKassignment help,IERG3310assignment help,Computer Networksassignment help,STUDENT ROBOTassignment help,TCPassignment help,UDPassignment help,C++assignment help,Javaassignment help,Pythonassignment help,CUHKsolution,IERG3310solution,Computer Networkssolution,STUDENT ROBOTsolution,TCPsolution,UDPsolution,C++solution,Javasolution,Pythonsolution,