Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In this programming assignment, you will write a client ping program in Java based on UDP. Your client will do the following: send a simple

In this programming assignment, you will write a client ping program in Java based on UDP.

Your client will do the following:

  1. send a simple ping message to a server, receive a corresponding pong message back from the server.

  2. determine the delay between when the client sent the ping message and received the pong message. This delay is called the Round Trip Time (RTT).

  3. your ping program is to send 10 ping messages to the target server over UDP. For each message, your client is to determine and print the RTT when the corresponding pong message is returned.

*Because UDP is an unreliable protocol, a packet sent by the client or server may be lost. For this reason, the client cannot wait indefinitely for a reply to a ping message. You should have the client wait up to one second for a reply from the server; if no reply is received, the client should assume that the packet was lost and print a message accordingly. (set a timer)

In this assignment, you will be given the complete code for the Server(No need to change anything in Server Class) & Client Class(this is what you will work on it) (available via this link).

Your job is to write the client code, which will be very like the server code. It is recommended that you first study carefully the server code.

*Note:

*You can then write your client code, liberally cutting and pasting lines from the server code with some functionalities to do the required tasks.

* To calculate RTT, you may use your system clock (system.nanotime();) to calculate the RTT.

*You must write comments on top of each method/work you do.

*You are required to submit your running project as Java Project with all itsclasses.

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

Database Systems For Advanced Applications 15th International Conference Dasfaa 2010 International Workshops Gdm Benchmarx Mcis Snsmw Diew Udm Tsukuba Japan April 2010 Revised Selected Papers Lncs 6193

Authors: Masatoshi Yoshikawa ,Xiaofeng Meng ,Takayuki Yumoto ,Qiang Ma ,Lifeng Sun ,Chiemi Watanabe

2010th Edition

3642145884, 978-3642145889

More Books

Students also viewed these Databases questions