C语言代写 | ECE 46300 PA3: Reliable Transport


1 Environment

To set up the environment for running this assignment, you must follow the instructions from PA0.
Download the code for this assignment from Brightspace. The code will be inside the directory “PA3/”. Open the terminal, and “cd” to the directory where you downloaded the assignment. Then enter the assignment directory by running the command “cd PA3”. Now you are ready to run the assignment!

2 Task

For this assignment, your task is to implement a reliable transport layer protocol similar to TCP.
We will call it tinytcp. Just like TCP, tinytcp must deliver a stream of bytes reliably and in-order to applications over the network. To accomplish this, tinytcp must implement connection set up and termination, application multiplexing, data acknowledgments and retransmissions, similar to TCP.
However, unlike TCP, tinytcp need not implement flow control and congestion control.

2.1 File transfer application

We will run a file transfer application over tinytcp. The files will be transferred from a client to a server. You can assume that there will be a single client and a single server. However, the client can initiate multiple (up to a maximum of 5) file transfers in parallel. Internally, tinytcp would create multiple parallel streams (one for each file transfer) between the client and the server. Your imple-mentation must be capable of multiplexing between multiple tinytcp streams.

3 Building and Running the Code

tinytcp is a real system that can be used to transfer files reliably between any two machines over a network. However, for the ease of testing, you will run both the client and the server on the samema-chine, connected over the loopback network interface (IP:, defined in “SERVADDR” parameter in “tinytcp.c”). For remote testing, you would change “SERVADDR” value to the IP address of the remote server (not required for this assignment). However, since there is not going to be any phys-ical link(s) between the client and the server in our loopback network, we simulate the link inside “tinytcp.c”. The link delay is configured using the parameter “DELAY” in “tinytcp.h”. The link can also be configured to be lossy as described below.

You should open up two SSH VM terminals (using the command “vagrant ssh”). In one terminal,you will run the server and in the other terminal the client. First, compile the code by running “make” in one of the terminals,

$ make

Next, to start the server, run the following command in one of the terminals,

$ ./bin/tinytcp server [loss_probability]


本网站支持淘宝 支付宝 微信支付  paypal等等交易。如果不放心可以用淘宝交易!

E-mail: itcsdx@outlook.com  微信:itcsdx