50.005 CSE Programming Assignment 2
Angelia Lau Kah Mun 1002417 Tham Yee Ting 1002516
-
Rename
filename
variable in ClientCP1 and ClientCP2 to the name of the test file you want to run. For example, to run the test filerr0.txt
, the corresponding line should be:String filename = "rr0.txt";
-
Change
hostName
variable in ClientCP1 and ClientCP2 to the local IP address of the server machine. For example, to run on localhost with the IP address 127.0.0.1, the corresponding line should be:String hostName = "127.0.0.1";
-
Run ServerCP1 (within your IDE or terminal) until you see the line
"Waiting for clients"
. -
Then, run ClientCP1 and wait for completion, denoted by
"Closing connection..."
. -
The file that has been uploaded to the server will be saved under the directory
/recv
with the same name as the file specified under step 1. If encryption and decryption of the files have been done properly, the contents of these two files should be the same. -
Repeat steps 3 to 5 for ServerCP2 and ClientCP2. You will notice that CP2 takes a much shorter time than CP1.
The files can be located within the /src
directory.
Is in the file throughputPlots.pdf
. We plotted the bytes/time for each test file for both CP1 and CP2. We see an exponential increase in throughput for CP2 (with symmetric key) as the file sizes increases.
Our test files range from rr0.txt
to rr7.txt
, each twice as large as the preceeding one. rr0.txt
begins from 1250 lines of text, while rr7.txt
ends with 16000 lines.