Question
Network program may be in Python or C (preferably python): To measure the average Round Trip Time (RTT) between your client and my server To
Network program may be in Python or C (preferably python):
- To measure the average Round Trip Time (RTT) between your client and my server
- To estimate the amount of segment loss over some testing interval
The UDP client program will have to do these things, while pinging any specified dns server: - It will have to send and receive, with these actions being asynchronous. This can be done with threads or with non-blocking I/O - It should measure the interval between sending a segment and receiving the segment back (if it comes back) - The program should compare the number sent with the number received to estimate the percentage of loss
Reference, to help guide control flow for the UDP program
Suggested control flow for this program Create and bind socket Define global variables Get target address and port Create recvfrom thread Delay? 44 Get time now, put in message, do sendto, Increment num_sent Sent specified number of messages? yes Wait for any straggler replies, Compute ave RTT, compute message loss percentage Recvfrom thread recvfrom Get time now, Extract time sent from message received, compute delta time, accumulate total delta times,increment num_received If the main thread sleeps for 2 seconds, any straggler replies will have time to turn up and be seen by the recvfrom thread.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started