Introduction to the UDP Echo Program
The UDP Echo program originally comes from the Donahoo "Sockets
Programming in C". The program (UDPEcho) is located in git
in the code directory. Note that there also is a similar
program that uses TCP (TCPEcho). The UDPEcho code is
here:
https://people.cs.clemson.edu/~jmarty/courses/CPSC6240-Student/code/UDPEcho/
Conceptual:
- UDPEcho is meant to be similar to the ping program
- The purpose of the code is to allow the client and server to
exchange a ping echo request and reply either for a specified
number of iterations, or forever. over and over - at the end
(upon CNT-C) the program provides statistics including the avg
Round Trip Time (RTT) and the observed loss rate.
- Over the Internet, we might observe an average RTT of 60
ms and a loss rate of perhaps 1%.
UDPEcho client .------ R1 ------R2 ------- Host ---- UDPEcho
server
Implementation and use of buffers. :
- The client uses a single buffer for the send and receive. It
updates the seq number and add a timestamp. We'll talk about how
internal representation of data messages need to be serialized
in an understood format so the data can be sent as an
unstructured stream of data.
last updated: 3/13/2019