Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Objectives: Understand how socket works. Explore socket programming. Have a deep understanding about TCP and UDP protocol in terms of transferring file preciselyand efficiently.Learnwhat a

Objectives:Understand how socket works. Explore socket programming. Have a deep understanding about TCP and UDP protocol in terms of transferring file preciselyand efficiently.Learnwhat a stream is and the differencesbetween input and output stream. Understand how to attach a stream to a device/socket.Exercise how to design and implement aprotocol which controls the communication between server and clientside.

Description:In this project, you are required to make a program to transfer the same file from client sideto server side for one hundredtimes with TCP/UDP protocol. Everytime as long as the fileis transferred, compare with the stored standard file to seethey are the same.If the received file is the same as the stored file, it means the file is transferred correctly, otherwise incorrectly.Count the transferring error rate (number of times incorrect file received atserver side out of one hundred times) for TCP/UDPto see its(UDP or TCP)reliability. At the meantime, count the time inmili-second cost to transfer the same file for hundred times with TCP/UDP.

Detailed Requirements:

1.You need to make two programs including one client side (C), one server side (S).

2.You can finish it by making TCPcode.

3.Use non-persistent TCP connection.

4.Pleaseuse Pythonlanguage.Using any other languages will result in zero of your project.

5.Your client and server side program mayrun inthe samehosts, but must use the Internet IP address, other than 127.0.0.0, or "local host".

6.You client side program sends the same file (see the sample text formatfile) to the server side for one hundredtimes.

7.You server side program receives thefile. Every timeas long asthe fileis completely received, pleasestore in at the server side in different name andcompareitwiththe standardfile (stored at server side in advance) to see if they are the same. If the received file is different from the standardfile, count one time incorrect transfer.

8.Use TCPsocketto finish file transferring for one hundredtimes, count the number of time that incurs incorrect transfer, and count the averagetime used forone hundredtimes transferringat server side.The time used to deliver the file includes connection setup time, data transferring time, and connection close up time.

9.When running your server side code, it must display at least the following information:

a.I am ready for any client side request

b.I am starting receiving file "xyz" for the nthtime

c.I am finishing receiving file "xyz" for the nthtime

d.The time used in millisecond to receive "xyz" for nthtime is:

e.The average time to receive file "xyz" in millisecond is:

f.I am done

10.When running your client side code, it must display at least the following information:

a.I am connecting to server side: server IP address

b.I am sending file "xyz" for the nthtime

c.I am finishing sending file "xyz" for the nthtime

d.The time used in millisecond to send "xyz" for nthtime is:

e.The average time to send file "xyz" in millisecond is:

f.I am done

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Financial management theory and practice

Authors: Eugene F. Brigham and Michael C. Ehrhardt

12th Edition

978-0030243998, 30243998, 324422695, 978-0324422696

Students also viewed these Programming questions